Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React 15.4 breaking changes #302

Closed
stylesuxx opened this issue Nov 18, 2016 · 6 comments
Closed

React 15.4 breaking changes #302

stylesuxx opened this issue Nov 18, 2016 · 6 comments
Labels

Comments

@stylesuxx
Copy link
Contributor

stylesuxx commented Nov 18, 2016

I got a report here and found some SO discussion.

The newest version of react seems to break the gen.

Temp fix is to use 15.3.0 or older:

npm install [email protected]

Seems to be related to react-hot-loader. Upgrading to react-hot-loader v3 should fix the problem, good that it is in beta -_-

@sthzg sthzg added the bug label Nov 18, 2016
@sthzg
Copy link
Member

sthzg commented Nov 18, 2016

Thanks for reporting. Also a bit of context on Github gaearon/react-hot-loader#417.

As the author of react-hot-loader states here that the stable 1.x hasn't received updates in a while and he considers 3.x to be more stable, do you have any objections to updating gen and template (both v3 and v4) to react hot loader v3?

I've setup RHL3 a few times in the past weeks, so I think it shouldn't take much time to get a PR ready for review. Otherwise this seems like a proper workaround: gaearon/react-hot-loader#417 (comment)

/cc @weblogixx

@stylesuxx
Copy link
Contributor Author

I am all for this changes - I am depending on your version 4, so an update would benefit me a lot - getting quite the issues lately. Let me know how I can help.

@phellipeandrade
Copy link

phellipeandrade commented Nov 20, 2016

Temp Fix using react 15.4.0

1. Remove react-hot from loaders in cfg/dev.js line 32

// Add needed loaders to the defaults here
config.module.loaders.push({
  test: /\.(js|jsx)$/,
  loader: 'babel-loader',
  include: [].concat(
    config.additionalPaths,
    [ path.join(__dirname, '/../src') ]
  )
});

2. insert this section in index.js

// Render the main component into the dom
ReactDOM.render(<App />, document.getElementById('app'));

if (module.hot) {
  module.hot.accept('./components/Main', () => {
     const NextApp = require('./components/Main').default;
    ReactDOM.render(
         <NextApp />, document.getElementById('app'));
  });
}

@sthzg sthzg mentioned this issue Nov 20, 2016
@weblogixx
Copy link
Member

Hi,

I am currently migrating some projects to react-hot-loader@3, if it seems stable enough, I will update the template with it (V3 and V4)

@sthzg
Copy link
Member

sthzg commented Nov 21, 2016

FYI: I have included the workaround (webpack alias to the new ReactMount location) into the v1.7.3 release of the template repo. This fixes installing/running the stable 3.x generator. Once the long-term solution discussed here and in @stylesuxx 's PR we could remove that alias again, but I feel that it was important to provide users of the 3.x line with a quick solution.

More info

@sthzg
Copy link
Member

sthzg commented Nov 22, 2016

Fixed now as follows:

  • the stable v3.x series continues using the stable RHL1.x and uses a Webpack alias to accommodate for the new location of ReactMount
  • the v4.x series has been updated to use RHL3.x.beta

Thanks for your patience and contributions.

@sthzg sthzg closed this as completed Nov 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants