Twitter | Search | |
Dan Abramov 16 Sep 16
Reply Retweet Like
Dan Abramov 16 Sep 16
Replying to @dan_abramov
My thoughts on this
Reply Retweet Like
Brandon Bloom 16 Sep 16
Replying to @dan_abramov
On the specific case of react router: the API is still totally clueless. Render a redirect component? Wtf? Makes no sense.
Reply Retweet Like
Sebastian Markbåge 16 Sep 16
The code locality makes perfect sense. I think it is our mental notion of what "rendering" is that's broken.
Reply Retweet Like
Brandon Bloom 16 Sep 16
The API seems like a desire to JSX-ALL-THE-THINGS and claims its "declarative" when really it is just "indirect".
Reply Retweet Like
Sebastian Markbåge 16 Sep 16
I get that and I'm not sure this make sense for all control Flow. However it is at the same time more modular.
Reply Retweet Like
Sebastian Markbåge 16 Sep 16
because the code for determining whether to redirect is often coupled to the selection of a view and share data
Reply Retweet Like
Brandon Bloom 16 Sep 16
Replying to @mjackson @sebmarkbage
The "throw" viewpoint is that instead of "redirect", you "fail" and somebody recovers from that failure.
Reply Retweet Like
Brandon Bloom 16 Sep 16
Replying to @sebmarkbage @mjackson
Precisely. Decouple effect from handling of it. Don't prescribe solution at point of failure.
Reply Retweet Like
David Nolen 16 Sep 16
this has all happened before … ;)
Reply Retweet Like
Sebastian Markbåge 16 Sep 16
Replying to @BrandonBloom @mjackson
Interestingly enough I believe that is actually how it works for the server rendering if my feedback made it.
Reply Retweet Like
Sebastian Markbåge 16 Sep 16
Kind of an unnecessary stab at our ignorance but I'll take it.
Reply Retweet Like
Sebastian Markbåge 16 Sep 16
React really makes more sense as a language feature. It's a language in user space which leads to this.
Reply Retweet Like
Sebastian Markbåge 16 Sep 16
Weird discrepancy between the React stack and normal stack. Should be easiee to build libs into langs
Reply Retweet Like