by mdp on 10/21/15, 7:39 AM with 74 comments
by unoti on 10/21/15, 3:58 PM
Although I've done some Javascript on the front end, I haven't done the other things I mentioned. The tutorials all seem to assume I know how to do everything but one little piece of detail, and I'm finding it difficult to bite on the elephant. It's hard to tell where to start on learning this stuff, and how much I need to learn before I can use it.
Any suggestions for what resources and approach to use to learn react? My goal eventually is an app that runs in 3 versions: web, iOS, android. I don't intend to use javascript on the server.
by andreasklinger on 10/21/15, 2:15 PM
Linters are by far powerful enough by now.
Can we (as community) switch to documenting style guides as linter rulesets + custom linters. Eg for javascript: eslint and jscs
Written style guides are good for understanding why - but linters actually help others to adapt to it quicker
by iamjs on 10/21/15, 2:58 PM
[1] https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API [2] https://github.com/github/fetch
by tzury on 10/21/15, 11:23 AM
Never use jQuery for DOM manipulation
Nice.by pramodliv1 on 10/21/15, 12:14 PM
>Do not use Backbone models
I use Backbone models for ajax since it makes decisions such as PUT vs POST and model.save() looks cleaner than $.ajax. Also, Backbone collections provide a declarative way to handle sorting and duplicate models. But these models are internal to the Store and not exposed to the views. I'm still a React newbie. Is this a valid reason to continue using Backbone?
2. It seems as though Khan Academy do not use React for SVG elements in their interactive exercises. For example, https://www.khanacademy.org/math/geometry/transformations/hs... Do you plan to migrate SVG to React?
by cnp on 10/21/15, 6:16 PM
Open elements on the same line.
The 80-character line limit is a bit tight, so we opt to conserve the extra 4.
Yes:
return <div>
...
</div>;
No: // "div" is not on the same line as "return"
return (
<div>
...
</div>
);
The latter I feel is much more readable and clear than the former, as it has a certain symmetry and cohesion that you find in normal html. The top one seems to be break readability. Wondering if anyone can comment on this specific decision?by traviswingo on 10/21/15, 3:08 PM
https://github.com/Khan/style-guides/blob/master/style/react...
Even though John Resig is one of their main devs.
by aaronkrolik on 10/21/15, 2:08 PM
by codingdave on 10/21/15, 12:25 PM
In all seriousness, though, I appreciate the brevity of this guide. It can be quickly read and understood, and is not the fully-fledged book I've seen from other places.
by liquidise on 10/21/15, 3:18 PM
In a traditional web app, we have 4 layers: client views, client app, server app, database. React, described as a strict view layer, in reality is being used as much more. At this point, it is not just consuming the client app, but is also taking nibbles at the server app as well.
To each their own of course, but i would ask people to hesitate about these decisions. The architectural issues with monolithic views is well known, and just because we have a shiny new tool does not mean we should throw that understanding by the wayside.
Source: i work full-time on a React and Backbone app
by twsted on 10/21/15, 12:27 PM
This seems a little strong. What is the reason for this guideline? I know of many projects that are combining the use of React with Backbone.
by amelius on 10/21/15, 11:23 AM
by lalwanivikas on 10/21/15, 2:07 PM
by NoCulturalFit on 10/21/15, 1:29 PM
Are there any CSS-frameworks that have been converted to JS but not are not their own components yet? It's easy to find React-Bootstrap but that comes with ready made components, I am looking for styling that's purely in JS so I can make my own components.
Also would a route-component be considered logic or presentation, or maybe it is its own thing and they forgot to mention it?