9 Commits

Author SHA1 Message Date
Sebastian McKenzie
af7510adec fix some bugs in PathHoister - fixes babel-plugins/babel-plugin-react-constant-elements#1
- Don't hoist constant elements to the same function as their original paths function parent.
 - Push each violation paths ancestry to the breakOnScopePaths collection to avoid constant hoisting to nested paths.
2015-07-08 11:35:34 +01:00
Conrad Zimmerman
224db29c05 Handle single child when using React inlining
Changes optimisation.react.inlineElements to handle a single child as the
value of the `children` property instead of wrapping it with an array.
This matches the behavior of `React.createElement`.
2015-07-03 18:55:38 -04:00
Sebastian McKenzie
100317e0c8 split react displayName addition into a plugin - fixes #1761 2015-06-20 22:01:40 +01:00
Sebastian McKenzie
14dddcda36 make PathHoister much more flexible, now ignores global references and will not deopt on reassignments and will instead hoist as high as it can, this also fixes #1529 since the order of operations has changed 2015-05-14 23:29:02 +01:00
Sebastian McKenzie
63344eb0a4 only skip traversal of immutable JSX elements in the optimisation.react.constantElements transformer when we've actually hoisted them - closes #1344 2015-04-24 19:28:51 +01:00
Sebastian McKenzie
86060cb0ce switch back to global uid registry - fixes #1136 2015-04-03 15:18:04 +11:00
Sebastian McKenzie
1ef41b6f32 optimisation.react.inlineElements: move children into props and leave children out if the element has none - @spicyj 2015-03-31 03:31:27 +11:00
Sebastian McKenzie
c4d260231b fix optimisation.react.constantElements test fixture names 2015-03-30 01:22:59 +11:00
Sebastian McKenzie
ca5daca5dd add optimisation.react.constantElements transformer - facebook/react#3228 2015-03-30 01:22:45 +11:00