futurice / futurice/pepperoni-app-kit

Missing redux hot reload snippet

Open
#90 4 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
JavaScript
Stars
4.6k
Forks
631
PR merge metrics
No merged PRs in 30d

Description

It seems by the look of it that the code to make Hot Module Reload with redux is missing.

See examples here: https://github.com/erikras/react-redux-universal-hot-example/blob/master/src/redux/create.js#L28-L32

and here: https://facebook.github.io/react-native/blog/2016/03/24/introducing-hot-reloading.html#redux-stores

@jevakallio do you think this code in `store.js` will work?

```
import reducer from './reducer';
if (__DEV__ && module.hot) {
module.hot.accept(() => {
store.replaceReducer(reducer);
});
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by inspecting store.js and compare its Redux hot-reload setup with the two referenced examples. Verify whether accepting the module update replaces the Redux reducer while preserving the store, and confirm that the resulting behavior works during development.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native, redux
Domain
mobile
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.