Closed yoshuawuyts closed 6 years ago
Looks good! 👍
this makes sense to me but I wonder what @marcbachmann thinks because there might've been a reason for doing it this way in #613
So far the state
variable was the only one which was route-specific and mutable, which was the reason I put it there. I'm good with that change. Tests for that would be good as we'll probably run into the same issue again.
@marcbachmann just to have some context: what issue were you running into? Agree we should have some tests for this; want to make sure we test for the right things.
what issue were you running into?
I was referencing to the statement in your issue description. (State should be serializable). I had no idea that we wanted to have that state object serializable. How do people use it and do we depend on that?
How do people use it and do we depend on that?
I've been experimenting with persisting state to a service worker (for offline support and shared state between tabs) but if you try to post a message with anything but plain serializable values it'll throw.
But yeah, we should probably document the desire to keep state serializable.
But yeah, we should probably document the desire to keep state serializable.
yeah, we should probably write a test for that too. I'll do that in a separate patch.
v6.10.3
State should be serializable; by moving ._handler off
state
we keep state a bit cleaner. Thanks!