Replies: 2 comments 2 replies
-
My recommendation is to store your own representations of the original data. |
Beta Was this translation helpful? Give feedback.
1 reply
-
You shouldn't be returning Exceptions from your back-end. And I wouldn't store them in state either. Your state should be simple objects holding only what information you need. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Suppose we have a state or action that contains some system types - an
Exception
orSystem.Type
or even delegates. Stuff like that.Since
ReduxDevTools
uses JSON serialization these are troublesome to "serialize".And there is actually no need for this. A simple "key: value.
ToString()
" would be enough for most cases. Just to see that some properties are set without the details.What would be the best approach for this?
Cluttering with
***JsonConverter
for all the types just for debugging doesn't seem to fit. There are multiple types which are not supposed to be serialized in any way.Marking actions and states with
JsonIgnore
won't work, since this will:Are there any other ideas?
Perhaps something like a callback in
FluxorOptions
which might look something likeFunc<object, SerializationMode>
. It will be called for each action and based on returned value will do the full serialization (usual one) or "light".In this case we can decide based on each action what kind of serialization we want.
Beta Was this translation helpful? Give feedback.
All reactions