Re:Things every React.js beginner should know
by tlrobinson on Monday January 25, 2016 @01:39PM
(#10968955)
One way to think about it is JSX is just another templating language that happens to be a superset of JavaScript. You are free to use as much or as little logic as you like, but the trend is definitely moving towards keeping most components simple and free of complex logic.
With "stateless functional components" (added in React 0.14) and ES6 you can have "templates" that look like this:
With "stateless functional components" (added in React 0.14) and ES6 you can have "templates" that look like this:
I wonder if anyone has written a linter to enforce a "logic-less" dialect of JSX? Perhaps allowing specific looping and conditional idioms like: and