概要
- react-redux-firebase を使ってCRUD を試してみた
- 一応動いた。。。が、使いこなせてない感。
- そのまま導入すると、以下のエラーが発生。
index.js:1 A non-serializable value was detected in an action, in the path: `auth`. Value:
Take a look at the logic that dispatched this action: {type: "@@reactReduxFirebase/LOGIN", auth: P, preserve: undefined}
- 以下のようにgetDefaultMiddlewareのオプションを指定することででエラーを消すことができた。
import {
configureStore,
getDefaultMiddleware,
EnhancedStore,
} from '@reduxjs/toolkit'
import { rootReducer } from './rootState'
import logger from 'redux-logger'
export const setupStore = (): EnhancedStore => {
const middlewares = [
...getDefaultMiddleware({
+ serializableCheck: {
+ ignoredActions: ['@@reactReduxFirebase/LOGIN'],
+ },
}),
]
参考
React + Redux + Firebase を使ってログイン機能あり掲示板アプリ開発②
Docker で zeit nowのデプロイ環境とNext.jsの開発環境を作ったメモ
PdfMakeを使ったPDF作成APIをZeit Nowで動かしたメモ
react-redux-firebase
react-redux-firebase useFirestore.md
error @@login
firestore
Zeit Now + Next.js のページにFirebase認証を導入した際、環境変数にハマったメモ