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

redux-little-router is deprecated #43

Open
jahed opened this Issue Dec 22, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@jahed
Copy link
Member

jahed commented Dec 22, 2018

Can't say I didn't see this coming.

https://github.com/FormidableLabs/redux-little-router

Switch to connected-react-router.

https://github.com/supasate/connected-react-router

This is likely going to be a painful migration. These libraries seem to change a lot. If it introduces too much maintenance overhead, consider writing a new library with minimal features.

To Do

  • Replace all react-little-router imports with connected-react-router, react-router, react-router-dom
  • Ensure <Link /> elements are correct
    • Replace href with to
    • Replace activeProps
  • Ensure LOCATION_CHANGE action handlers are correct (i.e. payloads)
  • Ensure <Route /> elements are correct
    • Replace forRoute with path
    • Use <Switch /> where needed
    • Choose appropriate prop (component, render or children)
  • Create wrapper library for all use cases to ease future migrations

@jahed jahed added the dependencies label Dec 22, 2018

@jahed jahed referenced this issue Dec 22, 2018

Closed

Prevent unnecessary renders caused by <Link /> #37

0 of 2 tasks complete
@jahed

This comment has been minimized.

Copy link
Member Author

jahed commented Dec 22, 2018

Migration mostly done, pretty much painless but I've hit a major blocker:

https://reacttraining.com/react-router/web/guides/dealing-with-update-blocking

It looks like react-redux and react-router don't play nicely together. There are workarounds, but it seems there's a fundamental flaw, probably the reason why I decided to switch to redux-little-router in the first place.

Having state in both the context and redux store causes a mess of expectations of when to update the tree or not. react-redux wants them through props so it only checks those, react-router wants them through the context.

@jahed jahed self-assigned this Dec 22, 2018

jahed added a commit that referenced this issue Dec 22, 2018

refactor(client): start migration to react-router
redux-little-router is deprecated. This is a work in progress. See #43.

jahed added a commit that referenced this issue Jan 14, 2019

refactor(client): use internal Link component instead of third-party
redux-little-router is deprecated

Progresses #43
Fixes #37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.