question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to hot reload a store with a different middleware?

See original GitHub issue

I have a DI container which I’m injecting into redux-thunk using the withExtraArgument method. When I’m hot reloading I need to recreate the DI, which means I need to replace the argument I’m passing the middlware or simply replace all middleware definitions, but I can’t think of any way to do it without recreating the entire store, which causes the following error to be thrown <Provider> does not support changing 'store' on the fly.

Is there a builtin way to do such a thing? or if not, what approach can you recommend for implementing such feature?

I’m using redux 3.6, react-redux 5.0.1 and react-hot-loader 3.0.0-beta.6

P.S. I hope this was the right repository to open this issue, if not let me know where should I have opened it. Thanks

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
timdorrcommented, Jan 19, 2017

This is a bug tracker, not a support system. For usage questions, please use Stack Overflow or Reactiflux. Thanks!

1reaction
jimbollacommented, Jan 19, 2017

This would actually belong in the redux repo. That being said…

I’ve got some ideas on how to make all store enhancers hot-reloadable, as part of the store enhancer overhaul goal, but I’m not ready to share the details quite yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reloading rails middleware without restarting the server in ...
Make use of auto-reloading, but make sure that the running rails instance and the already initialized middleware object keep "forgetting" ...
Read more >
Building a Live Reload Middleware Component for ASP.NET ...
Live Reload works by having a FileWatcher on the server that is created as part of the middleware instantiation. When the middleware is...
Read more >
Live Reload / Hot Module Replacement with Webpack ...
When using webpack-dev-middleware you don't get hot module replacement for free like you do with the webpack dev server. This is because the ......
Read more >
Enabling hot reload in React web app | by Dong Chen - Medium
Hot reload allows developers to see result of code change in browser without page ... webpack-hot-middleware: notify browser when a new bundle is...
Read more >
Configuring Your Store | Redux
A middleware which logs dispatched actions and the resulting new state. ... We'll add hot reloading both to our Redux reducers and to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found