Skip to content
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 implementation. Please update your code: use createWrapper() and wrapper.useWrappedStore(). #568

Open
PhillipGimmi opened this issue Mar 23, 2024 · 1 comment
Labels

Comments

@PhillipGimmi
Copy link

I am using the latest implementation and it does not work
import { configureStore } from '@reduxjs/toolkit';
import { createWrapper } from 'next-redux-wrapper';
import themeReducer from './themeSlice';
import chatBotLogicReducer from './chatBotLogicSlice';
import chatHeaderDesignSlice from './chatHeaderDesignSlice';
import chatBotHeaderDescriptionSlice from './chatBotHeaderDescriptionSlice';

export const makeStore = () =>
configureStore({
reducer: {
theme: themeReducer,
chatHeaderDesignSlice: chatHeaderDesignSlice,
chatBotLogic: chatBotLogicReducer,
chatBotHeaderDescription: chatBotHeaderDescriptionSlice,
},
});

export const wrapper = createWrapper(makeStore);
// _app.js
import AppWrapper from './AppWrapper';
import { wrapper } from '../store/store.js';
import '../app/globals.css';
import EclipseAnimation from '@/components/Eclipsetoggle';

function MyApp({ Component, pageProps }) {
return (

<EclipseAnimation onToggleMode={() => {}} />
<Component {...pageProps} />

);
}

export default wrapper.withRedux(MyApp);
it is not clear how one implements this new version

@Keshavdulal
Copy link

Solution: #488 (comment)

Discussed in #488

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants