Skip to content

Counter example HMR only works for React components but not for reducers #1804

@philj0st

Description

@philj0st

What is the current behavior?

The hot module reloading in the counter example only works for changes inside the react components but not for changes in the reducer. ex. if I change the INCREMENT action from return state + 1 to return state + 5 I get the following error:

[HMR] The following modules couldn't be hot updated: (Full reload needed)
This is usually because the modules which have changed (and their parents) do not know how to hot reload themselves. See http://webpack.github.io/docs/hot-module-replacement-with-webpack.html for more details.
process-update.js?e13e:89 [HMR]  - ./reducers/index.js

What is the expected behavior?
Wouldn't it be nice to have changes in react components and reducers work with persistent state.
Or would you say that's too confusing for a simple counter example .. but then again why is React HMR in there then?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions