-
Notifications
You must be signed in to change notification settings - Fork 340
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
Route data refactor #1043
Route data refactor #1043
Conversation
I'm all for something like this, but its not a good time, right when I'm in the middle of the websocket -> http rewrite. All the files you changed have been reworked pretty heavily, that would make merging this really difficult. You could rebase this on top of my Lets hold off on this and any other larger changes until after I finish the http stuff, so we don't get stuck in merge hell. |
Are we out of merge hell territory now? This would be a really nice refactor. |
@alectrocute I have to merge the HTTP changes into this branch, but once that's done it should be good to review. |
@dessalines (and @alectrocute since you seem interested too), the refactor is ready to review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for going through and typing all these.
Run prettier again, lint is complaining.
Besides that, make sure you tested all these routes on first load. If they worked, feel free to merge.
Lets get this one merged next. |
I found the route data somewhat unwieldy to work with. The way it is currently done, any
fetchInitialData
returns a list of promises, which are then resolved and used as a list in components asisoData
. This requires component constructors to make sure that the correct array index is being accessed, and it requires adding promises that do nothing tofetchInitialData
.This change makes it so that each route data is an object with a type. This should hopefully make any isomorphic logic easier to maintain.