News for hackers. Stuff that matters.
Re:Create React Apps with No Configuration by mason55 on Friday July 22, 2016 @05:40PM (#12146966)
> There's no official path from view layer -> complete app (no guidance for data flow, how to communicate with the server, server side rendering, routing on the client).

Every time I've decided to take an afternoon to poke at React this is where I've given up. I totally understand the model and appreciate how useful it can be but I've never been clear about how to actually hook it up to a backend that isn't just the generated demo scenario and what the requirements for my backend would be.

Re:Create React Apps with No Configuration by scarlac on Friday July 22, 2016 @06:04PM (#12147105)
I think this is common. For me the front page and JSX threw me off. React was so un-opinionated that it can loose its appeal when it presents itself. Once I took an opinionated tutorial it became much clearer to me.

Since then I've used React in conjunction with Django, PHP/Laravel, converted large jQuery codebases to React and created frontend-only sites. I've not yet gone full-on with a NodeJS back-end and isomophic and that's fine for now.

Pass your data into a root component via props. Or use XHR requests to load data from your backend into your root component and manipulate them in your state. Let the data changes in the root component trickle down via props. Keep it simple with React loaded via a <script> tag and work from there.

Re:Create React Apps with No Configuration by k3liutZu on Friday July 22, 2016 @06:16PM (#12147160)
No, that becomes a nightmare to maintain. Use Redux and connect any component that needs data to the store and get the data needed directly.
Re:Create React Apps with No Configuration by tptacek on Friday July 22, 2016 @06:50PM (#12147342)
Not much more to say about this than that I do not agree, that I think flux-alikes are overused, and that it's just as easy to go too far the other direction, where nothing has any state even for trivial UI state concerns.
Re:Create React Apps with No Configuration by danabramov on Saturday July 23, 2016 @06:19AM (#12149020)
Agreed.
Re:Create React Apps with No Configuration by ec109685 on Saturday July 23, 2016 @03:27AM (#12148709)
It seems like an afternoon is an awfully short time to allot to try a new framework / approach. I have definitely found lots in the Frontend world extremely frustrating at first given there are so many ways to do something, but it eventually clicks and makes sense.