Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Problem with react-hot-loader #7

Closed
Darmody opened this issue Sep 29, 2016 · 3 comments
Closed

Problem with react-hot-loader #7

Darmody opened this issue Sep 29, 2016 · 3 comments

Comments

@Darmody
Copy link

Darmody commented Sep 29, 2016

2016-09-29 11 19 01

Am I using it in wrong way?

@yesmeck
Copy link
Member

yesmeck commented Sep 29, 2016

暂时不支持的

@Darmody
Copy link
Author

Darmody commented Sep 29, 2016

const app = feeble();

if (module.hot) {
  module.hot.accept('./containers/Root', () => {
    app.hot.start(); // __REACT_HOT__ = true
    const NextRoot = require('./containers/Root').default; // eslint-disable-line global-require
    render(
      <AppContainer>
        <NextRoot />
      </AppContainer>, rootEl
    );
    app.hot.end(); // __REACT_HOT__ = false
  });
}

这种方式如何?利用一个全局变量控制一下。

@yesmeck
Copy link
Member

yesmeck commented Sep 29, 2016

RHL 现在还不稳定 gaearon/react-hot-boilerplate#97 (comment) 要用可以自己想办法配下。

@yesmeck yesmeck closed this as completed Jan 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants