You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you want to request a feature or report a bug?
bug What is the current behavior?
Any change to the redux store cause the onChange function to be executed. This causes our app to slow down a lot.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:
What is the expected behavior?
For the onChange to only be called when the localize part of the state is changed
Which versions of react and react-localize-redux are you using?
react: 16.8.6
reat-localize-redux: 7.0.3
redux: 4.0.1
Redux suggest something like this
function observeStore(store, select, onChange) {
let currentState;
function handleChange() {
let nextState = select(store.getState());
if (nextState !== currentState) {
currentState = nextState;
onChange(currentState);
}
}
let unsubscribe = store.subscribe(handleChange);
handleChange();
return unsubscribe;
}
Do you want to request a feature or report a bug?
bug
What is the current behavior?
Any change to the redux store cause the onChange function to be executed. This causes our app to slow down a lot.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:
What is the expected behavior?
For the onChange to only be called when the localize part of the state is changed
Which versions of
react
andreact-localize-redux
are you using?react: 16.8.6
reat-localize-redux: 7.0.3
redux: 4.0.1
Redux suggest something like this
function observeStore(store, select, onChange) {
let currentState;
function handleChange() {
let nextState = select(store.getState());
if (nextState !== currentState) {
currentState = nextState;
onChange(currentState);
}
}
let unsubscribe = store.subscribe(handleChange);
handleChange();
return unsubscribe;
}
reduxjs/redux#303 (comment)
The text was updated successfully, but these errors were encountered: