-
Notifications
You must be signed in to change notification settings - Fork 4
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
Thoughts #19
Comments
I was going to chime in about React Router. To be fair, it gets mixed reviews from the API churn it has had over the past year or so. But I do think that the impact of those changes is quite overblown, and I also think it's a pretty good choice for being able to share routes between client and server, and it's pretty simple to use. I think of it as a declarative way to select the layout of the page from the route, rather than the more imperative Express flow, which also doesn't map as well to the client, AFAIK. There are probably other good options as well, but I'm not highly familiar. |
Totally 👍 These are currently all only consequences of getting the tech we want to experiment with up and running as fast as possible.
Makes a lot of sense 👍 #20
Totally, I’m not adding any Webpack stuff that I don’t fully understand or won’t work with our setup.
Agreed. @orta wanna pick that up?
Thus far my only consideration has been that I don’t want to introduce any of that until there’s a good reason to do so. I would prefer all routing to happen server-side. In my opinion it makes it easier to decide what type of routing to do when, where routing is performed, and just simplifies reasoning about the app in general. |
What “state” are you thinking of? From what I’ve seen, Force has very little client-side state. The bits it has can probably all live in a component’s state dictionary.
Code locality, the data requirements are in the same file as the component that needs it. The components don’t have to deal with actually fetching that data and optimising multiple queries into 1. Whether this happens on the server or the client makes little difference. (Currently we serialise the Relay request data so that the client doesn’t need to make any unnecessary requests as well, but it’s not entirely clear how/if that would work in Relay 2.) The static analysis component applies somewhat right now, but it’s going to play a much bigger role in Relay 2. |
Yeah generally Force doesn't have a lot of client-side state, but occasionally it will have quite a bit of it (e.g. https://www.artsy.net/collect, inquiry modal flows, other onboarding/set-management style interfaces). I think leaving this to component's internal state is a totally good default and I'm happy to have Relay's co-location + query aggregating benefits 👍 Thanks for explaining! |
Not sure an issue is the right format to leave my thoughts on this, but I'll quickly jot them down here:
if (module.hot)
clutter the code too)fetch().then(() => res.send(ReactComponent))
code. I guess the component portability/static analysis?👍 👍 👍 exciting stuff!!
The text was updated successfully, but these errors were encountered: