-
Notifications
You must be signed in to change notification settings - Fork 215
Is there a better way to handle nested properties in state? #37
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
Comments
Heya, sorry about the delay -- somehow missed this notification! Have you played around with the That, in combination with something like a That would allow you to handle the actions you care about without creating a new instance each time unless it needs to change. |
Hey, please let me know if I can help further or if it's cool to go ahead and close this down :) Best, Brian. |
Hello Brian! Sorry for my late reply, Many thanks for the hints! I ended up using copyWith and really liked how clear the code looks with this method. Feel free to close this. Again many thanks, and awesome library! 😊 |
Sure thing, glad to help, and happy it's working well for ya :) |
For example, I have the following nested state (only left the relevant parts for clarity):
And the reducer:
I have thought 2 options:
Do you have a recommendation?
The text was updated successfully, but these errors were encountered: