-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
TypeError do not know how to serialize a BigInt #1541
Comments
We're hitting this as well - our store contains bigints. This is likely the same problem as preactjs/preact-devtools#454 |
I ended up solving this by passing the following config when setting up devtools: serialize: {
replacer: (_key, value) => (typeof value === "bigint" ? value.toString() : value),
}, |
how can i get that working when using I tried doing this and even putting a debugger on it but it never gets called. I use redux-dynamic-modules and my setup looks like this:
|
ok found another solution :
|
ok its just wrong typing, the first solution already works, just had to disabled typescript in that line |
also you can convert it to the Number, so in TypeScript:
|
I'm not sure why you're putting a field named composeWithDevTools({
serialize: {
replacer: (_key, value) => {
return typeof value === "bigint" ? value.toString() : value;
},
},
}); |
Whenever I open Redux DevTool chrome extension to inspect the store, I get this error.
VM1161:1 Uncaught TypeError: Do not know how to serialize a BigInt
at JSON.stringify ()
at it.stringify (:1:5274)
at kh (:4:2215)
at j (:4:2313)
at q (:6:452)
at :6:3807
at g (:1:27571)
at l (:1:27629)
at T (:1:28063)
at T (:6:5699)
The text was updated successfully, but these errors were encountered: