TypeError when using reducer()
See original GitHub issueWhen I import this reducer https://github.com/prescottprue/redux-firestore/blob/master/src/reducer.js
import { firestoreReducer } from 'redux-firestore'
const store = createStore(
{
firestore: reducer(firestoreReducer)
}
)
I get
immer.module.js:211 Uncaught TypeError: 'ownKeys' on proxy: trap result did not include 'i'
at Function.freeze (<anonymous>)
at freeze (immer.module.js:211)
at Immer.maybeFreeze (immer.module.js:1616)
at Immer.processResult (immer.module.js:1456)
at Immer.produce (immer.module.js:1348)
at Object.queriesReducer [as queries] (queriesReducer.js:85)
at reducers.js:60
at Array.reduce (<anonymous>)
at reducers.js:59
at index.js:30
...
This doesn’t happen when I disable immer.
Tested on 3.3.1 & 3.4.0-beta
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Try to connect Action with Reducer but get Error: Uncaught (in ...
I am using the useEffect useEffect(() => ( fetchUser() ), []). For one, you have to use {} , not () in your...
Read more >Writing Reducers with Immer | Redux Toolkit - JS.ORG
Redux Toolkit's createReducer and createSlice automatically use Immer internally to let you write simpler immutable ... "mutate" the array by calling push()
Read more >Array.prototype.reduce() - JavaScript - MDN Web Docs
The reduce() method executes a user-supplied "reducer" callback function on each element of the array, in order, passing in the return value ...
Read more >cannot read properties of undefined (reading 'type') redux
The first arg should be the reducer. The second arg is initial state. Since you're passing reducer as initial state, that's why you're...
Read more >Try to connect Action with Reducer but get Error: Uncaught (in ...
Coding example for the question Try to connect Action with Reducer but get Error: Uncaught (in promise) TypeError: dispatch is not a function-Reactjs....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Voilà : https://codesandbox.io/s/great-swirles-x8fvd?file=/src/App.js:1241-1274
@ctrlplusb aha okay, it makes sense 👍 sure I’ve started already, will update once it’s finished, before next week.