Comments (13)
@nirrek, thanks for the explanation. In the unbuilt (unuglified) extension TypeError: e is not a function
becomes TypeError: reducer is not a function
. Without the extension (and DevTools at all) I also get this error as TypeError: currentReducer is not a function
and hmr doesn't work. While changing const nextReducer = require('../reducers');
to const nextReducer = require('../reducers').default;
fixes it, which is actually the same as we get with babel-plugin-add-modules-exports
.
I'm curious to see the case when the error occurs only with the extension enabled and especially looking forward to seeing how we can get actions hot reloaded.
from redux-devtools-extension.
As far as I know, HMR deals only with reducers (if you enable it in your store) as you can use replaceReducer
for that. For action creators you do have to refresh the page manually. Does it work when you disable the extension?
About the "JavaScript TypeError saying e is not a function" cannot reproduce it with the counter example. Could you share an example? BTW, it would be a great contribution to have here a simple ImmutableJS example to check it when we implement new features.
from redux-devtools-extension.
Hey @garretto,
Even though I cannot reproduce it, should be fixed in 0.4.16
. Could you please give it a try?
from redux-devtools-extension.
For action creators you do have to refresh the page manually.
To be fair action creators should be reloaded if you use React Hot Loader. They don't with React Transform—we'll fix that eventually but not very soon.
from redux-devtools-extension.
@zalmoxisus I tried with the new version and no dice. Something in the plugin prevents a full page reload. Also for editing reducers actually. Ended up just installing redux-dev-tools into my project and it works fine there.
Also should have mentioned I'm using react-transform-hmre @gaearon not react-hot-loader. Thanks for creating both of those by the way. :)
from redux-devtools-extension.
If I get some time I'll try to reproduce with the counter example.
from redux-devtools-extension.
That's strange, just tried babel-preset-react-hmre
and don't see any difference. As I see, it also includes react-transform-hmr
. A PR to the counter example to reproduce that, would be welcome.
from redux-devtools-extension.
The .babelrc
of the react-transform-boilerplate looks like this:
{
"presets": ["react", "es2015"],
"env": {
"development": {
"presets": ["react-hmre"]
}
}
}
Whereas the .babelrc
of the counter example looks like this:
{
"presets": [ "es2015", "stage-0", "react" ],
"plugins": [ "add-module-exports", "transform-decorators-legacy" ]
}
If you remove the add-modules-exports
plugin from the counter example's .babelrc
, you will see the error @garretto refers to. Namely: TypeError: e is not a function
will be printed inside the devtools window if you update a reducer (counter.js
in this particular case).
Similarly, if you install babel-plugin-add-modules-exports
and add it to the .babelrc
of your react-transform-boilerplate based project, hot loading of reducers should work.
from redux-devtools-extension.
FYI we added an explicit error message in Redux 3.1.5 for this.
reduxjs/redux#1321
from redux-devtools-extension.
@gaearon, unfortunately, this doesn't help in our case as replaceReducer
doesn't get the nextReducer
directly, but through liftReducer
. May I add that exception also into the liftReducer
's function?
from redux-devtools-extension.
Oh, good point. Want to make a PR?
from redux-devtools-extension.
@gaearon, gladly :)
I added the same message about nextReducer
there as to be easier to google the error.
from redux-devtools-extension.
Should be fixed in v1.0.0-beta3
with more descriptive error. Thanks, @gaearon, the provided explanation for the error is great!
@garretto, if you still have that error and have time to provide an example or to add some hints on how to reproduce it, please reopen the issue.
from redux-devtools-extension.
Related Issues (20)
- Should I see this URL attached to dev tools?
- Multiple stores, one under Suspense, break devtools
- options.instanceId doesn't support Symbols as instance name. HOT 1
- TypeError: window.devToolsExtension is not a function HOT 2
- Please allow us to change the font of redux devtools HOT 1
- Redux DevTools triggering a false positive 'This page is using the production build of React. ✅' HOT 9
- dispatching actions from devtools are ignored by middlewares HOT 1
- Project moved to new repository HOT 2
- Something went wrong with interface of React Dev Tools in Google Chrome. HOT 4
- Git.io deprecation notice
- EMPTY SCREEN REDUX DEVTOOL NOT THE EXTENSION, IM INSTALLED IN MY PROJECT HOT 1
- Hey
- Can't allow Symbol type
- 点击diff一片黑屏
- Redux devtools blank after clicking "Trace" on undefined action, removing and reinstalling did not fix it
- Unreadable code in stack (black text on black background)
- Redux devtools are blank
- TypeError: this.props.stateTreeSettings is undefined HOT 2
- Done
- Tooltip cut off (overflow: hidden)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redux-devtools-extension.