A generic library implementing hot reload for React components without unmounting or losing their state.

Usage no npm install needed!

<script type="module">
  import reactHotify from '';


React Hotify

This project is a successor of React Hot API.
It has less features and is much less mature.

For now, use at your own risk.
Read The Death of React Hot Loader for some context.


Annotate component classes with the decorator this library exports. The decorator accepts one parameter: a string uniquely identifying the given component class in your application. It should persist between the live edit reloads. For example, you can use the module filename concatenated with the class name.

You should generate these decorator calls (e.g. with a Babel plugin) so users don't have to write them.



import React from 'react';
import hotify from 'react-hotify'; // Your tool should generate this

@hotify(`${}-Other`) // Your tool should generate this
class Other {
  render() {
    return (

@hotify(`${}-App`) // Your tool should generate this
export default class App extends React.Component {
  render() {
    return (
      <Other />

// Opt-in to Webpack hot module replacement for the module; // Your tool should generate this




This time, we've got tests!

npm install
npm test