-
-
Notifications
You must be signed in to change notification settings - Fork 266
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
/!\ You are using legacy implementaion. Please update your code: use createWrapper() and wrapper.useWrappedStore(). #488
Comments
You did not provide code snippet of your
Instead, replace it with:
source: redux toolkit example |
@ribeaud this behavior is by design. @aldabil21 is absolutely correct, it is the recommended way to use the library. |
Thank you guys. And sorry to be so lazy... Unfortunately, I am still a bit lost (NOT being an expert here). Our How should I update this code? |
I came here because someone had a StackOverflow question on this - and checking the repo, this is acutally not really mentioned in the There is a section on |
For who is interested (could not find a better way...), I ended up with following solution (using this app definition): const AppWrapper = ({ Component, ...rest }: AppProps): ReactElement => {
const { store, props } = wrapper.useWrappedStore(rest);
return (
<Provider store={store}>
<App Component={Component} {...props} />
</Provider>
);
};
export default appWithTranslation(AppWrapper, nextI18NextConfig); |
The section in readme has been corrupted somehow after merges, I've fixed it: https://github.com/kirill-konshin/next-redux-wrapper#wrapperusewrappedstore |
It still shows wrapper.withRedux code with a class component, could you please update the code? |
Describe the bug
Since v8.0.0, I am getting following warning in the console:
This is NOT the case with 7.0.5.
Because I was not able to find any release notes for next-redux-wrapper, I am not sure whether the problem is on my side, or on next-redux-wrapper's side.
Expected behaviour
The warning does NOT appear.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: