Redux persist integration in hydrogen/remix #2227
Unanswered
Pankajmehta1998
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
this is my store file:
`import {applyMiddleware, compose, createStore} from 'redux';
import persistReducer from 'redux-persist/es/persistReducer';
import persistStore from 'redux-persist/es/persistStore';
import storage from 'redux-persist/lib/storage';
const persistConfig = {
key: 'root',
storage: storage,
};
const persistedReducer = persistReducer(persistConfig, appReducers);
const store = createStore(
persistedReducer,
compose(
applyMiddleware(),
window.REDUX_DEVTOOLS_EXTENSION
? window.REDUX_DEVTOOLS_EXTENSION()
: (f) => f,
),
);
const persistor = persistStore(store);
export {persistor};
` but when i am running the code its breaking with these its not deploying. I want to use persist as my redux data is getting removed when app is refreshed. It gives this error: Environment variables injected into MiniOxygen: MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above. at #assembleAndUpdateConfig (/home/user/Desktop/abc/abcd/node_modules/miniflare/dist/src/index.js:8478:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Mutex.runWith (/home/user/Desktop/abc/abcd/node_modules/miniflare/dist/src/index.js:3405:16) at async #waitForReady (/home/user/Desktop/abc/abcd/node_modules/miniflare/dist/src/index.js:8528:5) at async startWorkerdServer (file:///home/user/Desktop//abc/abcd/node_modules/@shopify/cli-hydrogen/dist/lib/mini-oxygen/workerd.js:101:24) at async safeStartMiniOxygen (file:///home/user/Desktop//abc/abcd/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/dev.js:121:18) at async onBuildFinish (file:///home/user/Desktop//abc/abcd/node_modules/@shopify/cli-hydrogen/dist/commands/hydrogen/dev.js:208:13)export default store;
and this is my root file code:
Beta Was this translation helpful? Give feedback.
All reactions