acdlite / redux-router

Redux bindings for React Router – keep your router state inside your Redux store
MIT License
2.3k stars 216 forks source link

Moved `initRoutes` dispatch to `componentWillMount` #246

Closed joellanciaux closed 8 years ago

joellanciaux commented 8 years ago

Thanks a ton for putting together redux-router -- it's super awesome and has helped me a ton over the past few months. :+1:

In something I'm working on right now, the ReduxRouter component is conditionally rendered / isn't at the root of my application, which was leading to a stream of the following errors :

Warning: setState(...): Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state.

Moving the dispatch to componentWillMount resolves this issue.

Scarysize commented 8 years ago

Thanks for your contribution!

joellanciaux commented 8 years ago

You rock -- thanks for merging. :+1:

Absolutely no pressure / rush, but do you potentially know when the next npm publish might be planned?

Scarysize commented 8 years ago

I guess when #245 is done.

mjrussell commented 8 years ago

@Scarysize maybe we should get one more beta for 1.0 and then move to 2.0 to denote the React-Router 2 upgrade? I think we are pretty close to finishing the REAMDE updates

Scarysize commented 8 years ago

@mjrussell you mean publishing the current state as 1.0-beta8 and then going straight to 2.0?

mjrussell commented 8 years ago

@Scarysize yup! That way its super clear which version of Redux-Router supports the version of React-Router

Scarysize commented 8 years ago

@mjrussell yep, seems reasonable. Guess I will do a release later ( @jasongonzales23 )

joellanciaux commented 8 years ago

I just saw that a new version was released -- thanks again :smile: :+1: