Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dispatching updates to ReduxDevTools relies on #363

Open
vincentnl opened this issue Aug 1, 2023 · 1 comment
Open

Dispatching updates to ReduxDevTools relies on #363

vincentnl opened this issue Aug 1, 2023 · 1 comment

Comments

@vincentnl
Copy link
Contributor

First - Kudos for the developer and contributors. I dove into the code to help more, but it entered typescript, and I was somewhat out of my depth.

As far as I can make it, Hydrating and dehydrating relies on the JsonSerializerOptions provided. However when dispatched to ReduxDevTools it does not use these options.

Example: Serializing List only shows the properties of the interface, while my CustomConvertor in the JsonSerializerOptions convert it to the actual type, and will show additional properties, not present on the IAccount interface, or better said, tests for interfaces derived from IAccount and serialize the additional properties.

I am able to fix this - with a little trickery - by adding additional lists that transform the base IAccount list to their implemented types.

Now this can be a design choice, for performance; Fluxor has chosen to use the options for Devtools.

Might be resolved by not dispatching the state as an object, but as a json string, before entering typescript.

@StevenTCramer
Copy link
Collaborator

I see your point... if we serialize before going to js then CustomerConverters will run. I am in the middle of updating everything to dotnet 8 now but once that is complete I or an associate can take a look at this.

Thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants