Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-hot-loader

Package Overview
Dependencies
Maintainers
1
Versions
180
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-hot-loader - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

16

hot.js

@@ -76,2 +76,16 @@ 'use strict';

function forceUpdateTree(instance) {
if (instance.forceUpdate) {
instance.forceUpdate();
}
if (instance._renderedComponent) {
forceUpdateTree(instance._renderedComponent);
}
for (var key in instance._renderedChildren) {
forceUpdateTree(instance._renderedChildren[key]);
}
}
var Component;

@@ -89,3 +103,3 @@ return {

instance._bindAutoBindMethods();
instance.forceUpdate();
forceUpdateTree(instance);
});

@@ -92,0 +106,0 @@

2

package.json
{
"name": "react-hot-loader",
"version": "0.1.6",
"version": "0.1.7",
"description": "Webpack loader that enables live-editing React components without unmounting or losing their state",

@@ -5,0 +5,0 @@ "main": "index.js",

# react-hot-loader
This is a **highly experimental** proof of concept of [React live code editing](http://www.youtube.com/watch?v=pw4fKkyPPg8).
It marries React with Webpack [Hot Module Replacement](http://webpack.github.io/docs/hot-module-replacement.html) by monkeypatching `React.createClass`.
It marries React with Webpack [Hot Module Replacement](http://webpack.github.io/docs/hot-module-replacement.html) by wrapping `React.createClass` calls in a custom function that updates components' prototypes when the changes come in.
Inspired by [react-proxy-loader](https://github.com/webpack/react-proxy-loader).
![](http://f.cl.ly/items/0d0P3u2T0f2O163K3m1B/2014-07-14%2014_09_02.gif)
![](http://f.cl.ly/items/3T3u3N1d2U30380Z2k2D/2014-07-14%2014_05_49.gif)
## Installation

@@ -49,2 +54,3 @@

Currently, it keeps a list of mounted instances and updates their prototypes when an update comes in.
A better approach may be to make monkeypatch `createClass` to return a proxy object [as suggested by Pete Hunt](https://github.com/webpack/webpack/issues/341#issuecomment-48372300):

@@ -51,0 +57,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc