Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

redux persist a non-serializable value was detected in an action in the path register

import { configureStore, getDefaultMiddleware } from 'redux-starter-kit'

// ...

export const store = configureStore({
  reducer,
  middleware: getDefaultMiddleware({
    serializableCheck: false,
  }),
})
Comment

A non-serializable value was detected in an action, in the path: `register`. Value: ƒ register(key) Redux

import { configureStore } from '@reduxjs/toolkit'
import {
  persistStore,
  persistReducer,
  FLUSH,
  REHYDRATE,
  PAUSE,
  PERSIST,
  PURGE,
  REGISTER,
} from 'redux-persist'
import storage from 'redux-persist/lib/storage'
import { PersistGate } from 'redux-persist/integration/react'

import App from './App'
import rootReducer from './reducers'

const persistConfig = {
  key: 'root',
  version: 1,
  storage,
}

const persistedReducer = persistReducer(persistConfig, rootReducer)

const store = configureStore({
  reducer: persistedReducer,
  middleware: (getDefaultMiddleware) =>
    getDefaultMiddleware({
      serializableCheck: {
        ignoredActions: [FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER],
      },
    }),
})

let persistor = persistStore(store)

ReactDOM.render(
  <Provider store={store}>
    <PersistGate loading={null} persistor={persistor}>
      <App />
    </PersistGate>
  </Provider>,
  document.getElementById('root')
)
Comment

PREVIOUS NEXT
Code Example
Javascript :: filter biggest value javascript object 
Javascript :: find lowest number in array js 
Javascript :: javascript onclick image 
Javascript :: is_int js 
Javascript :: drop down listing in angular form 
Javascript :: javascript random word 
Javascript :: get message author discord.js 
Javascript :: read json from file js 
Javascript :: run build version react 
Javascript :: ng class in angular 
Javascript :: js writing to json file 
Javascript :: prop-types install npm 
Javascript :: sequelize order by 
Javascript :: get all links from html javascript 
Javascript :: delay statement in js 
Javascript :: how to check consecutive characters in javascript 
Javascript :: javascript e.key 
Javascript :: onchange not working input jquery 
Javascript :: react native remove text from string 
Javascript :: strapi production build 
Javascript :: yarn add react-native-elements 
Javascript :: MDB React Bootstrap Import 
Javascript :: javascript map Removing Elements 
Javascript :: javascript check if required 
Javascript :: all ajaxcomplete event 
Javascript :: javascript lowercase string except first letter of every word if there are ' 
Javascript :: how to remove a property from an object in javascript 
Javascript :: jquery animation 
Javascript :: javascript video feed 
Javascript :: javascript function required arguments 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =