Closed rschroll closed 4 years ago
Note that this requires thedataincubator/website#1991 to function. I've deployed both this and that to staging for testing.
In a bit of testing, the only problem I noticed was that, if you were supposed to load json data from the website on your first visit, but were forced to redirect to login first, you don't automatically load the data when you're directed back to the resumake page. Hitting the load data button works, though.
If there's an easy fix to this, please suggest it. Otherwise, don't worry about it.
In a bit of testing, the only problem I noticed was that, if you were supposed to load json data from the website on your first visit, but were forced to redirect to login first, you don't automatically load the data when you're directed back to the resumake page.
I tracked this down and found where it goes wrong.
In store.js
I'm explicitly excluding fellowData
from persistence.
As a result the store is hydrated with inconsistent state on page/application reload.
That's wrong and I think we should persist the whole tdi
state. (And any non-calculated application state in general.)
Persisting the whole state does indeed fix this reloading issue, but I need to test it out better so that we don't end up with another batch of bugs - it would definitely be safer to use your solution now.
I'm going to merge this in now, but we can worry about the state management in the future.
Two fixes:
Putting react components in the actions file is really sloppy, but it gets the job done.
Please go ahead and push fixes to this branch; I'd like to deploy it tomorrow if possible.