-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up accion changes state #164
Comments
Hi, I'm assuming you're running the latest version of Redux Tools (0.9.1 for all packages). If not, I suggest upgrading to this version as the older ones have some known issues.
Reasons 1. and 2. are quite obvious. The latter ones are more difficult to track down and often happen when you're creating React components dynamically and not memoizing them properly using useEffect(() => {
return () => alert('unmounted')
}, []) inside the component that is wrapped in your Here's another example of wrong implementation: const Something = () => null
const App = ({ someReducer }) => {
const SomethingContainer = withReducers({ some: someReducer })(Something)
return <SomethingContainer />
} Again, it's necessary to use Without seeing your code, it's hard to know where the issue may be, but I suspect that you're using It's not possible to do something like this: const TabA = withReducers({ common: commonReducer })(A)
const TabB = withReducers({ common: commonReducer })(B)
const TabC = withReducers({ common: commonReducer })(C)
const MyTabs = ({ currentTab }) => {
if (currentTab === 'a') return <TabA />
if (currentTab === 'b') return <TabB />
if (currentTab === 'c') return <TabC />
return null
}
|
Hi
I have a tabbed UI and the taps have a connection to an epic that loads data for it. The UI works mostly OK and when I'm changing the tabs the redux-tools/CLEAN_UP is run. It is usually empty but for one tab it resets the state. The tabs are nearly identical. They just have different epics connected.
Any idea why the CLEAN_UP is modifying the state for one tab and not for the others?
The text was updated successfully, but these errors were encountered: