by wingspan · 12y ago · 0 comments
In short:
- Don't pass around components and call methods on them; prefer to pass props instead
- Conditional rendering instead of hiding, exactly as [3]
- Use the JSX harmony transforms
- Declare props
- Use classSet
- setState only needs to include props that change, rest stay the same
[1] https://github.com/ianobermiller/reactexperiment/commits/
TLDR: JSX transformer makes the following ES6 features compatible with old browsers (IE8+) * arrow functions [http://tc39wiki.calculist.org/es6/arrow-functions/] * classes [https://github.com/esnext/es6-class] * destructuring [http://fitzgeraldnick.com/weblog/50/] * object concise methods [http://ariya.ofilabs.com/2013/03/es6-and-method-definitions....] * rest parameters [http://tc39wiki.calculist.org/es6/rest-parameters/] * template strings [http://tc39wiki.calculist.org/es6/template-strings/] * object literal property shorthand [http://tc39wiki.calculist.org/es6/object-literal-enhancement...]
Notably absent: default parameter values and block scoping ("let")