1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

react-redux-firebase を導入しようとしたときに起きた@@reactReduxFirebase/LOGINのエラーを消したメモ

Posted at

概要

  • 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'],
+      },
    }),
  ]

CRUD追加時のソース

参考

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認証を導入した際、環境変数にハマったメモ

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?