-
Notifications
You must be signed in to change notification settings - Fork 759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to react 16 #792
Update to react 16 #792
Conversation
Reference: https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html Replace -> With react-addons-transition-group -> react-transition-group/TransitionGroup react-addons-css-transition-group -> react-transition-group/CSSTransitionGroup react-addons-update -> immutability-helper react-addons-test-utils -> react-dom/test-utils Removed react-addons-linked-state-mixin use Value and onChange react-addons-create-fragment React16 has fragments react-addons-pure-render-mixin use React.PureComponent react-addons-perf see https://facebook.github.io/react/docs/optimizing-performance.html#profiling-components-with-the-chrome-performance-tab
@@ -129,15 +129,23 @@ def component_name | |||
|
|||
def file_header | |||
if webpacker? | |||
%|var React = require("react")\n| | |||
if options[:es6] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it important to distinguish between these two varieties of preprocessed JS? I mean, what's the scenario where you want require(...)
but not import
?
Anyone who's using webpacker will probably already use Babel (for JSX), right? So do you think one of these options would be sufficient by itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was tempted to scrap all the old style generators but was not sure on the effect it would have with sprockets + babel transpiler. I did what looked safe given I still don't fully know the system and saw the option[:es6]
used nearby in the same file.
Will continue on this path a little this afternoon, seems like the most pressing issue for now, then maybe the HMR ( 793 ) thing after once I get time.
The ruby racer pegged libV8 to V3 which is too old for 'Set' which is now standard in JS. The ruby racer therefore cannot be supported this gem.
React is compiled away in JSX transformer using Import syntax
@rmosolgo I couldn't find a way of getting it to accept the migration to Thoughts? |
React.DOM used reactid but createElement does not https://reactjs.org/blog/2016/03/07/react-v15-rc1.html#documentcreateelement-is-in-and-data-reactid-is-out
Yeah, I guess there are other ways to get addons these days, so it's not as important to bundle them here. That two-release plan sounds good, that seems like it would be easier for people to migrate, too. |
Previous version has 3k downloads. Not hearing anything about bugs in its use. Tempting to get ready to merge this one in. |
Do your thing 😎 |
Add pry-byebug for ease of debugging. Update the locally used react_ujs to 2.5.0
* Upgrade all Yarn deps in Test folders * Migrate to webdrivers gem * Revert Bundle Renderer test to before #792 Add pry-byebug for ease of debugging. Update the locally used react_ujs to 2.5.0 * Use travis recommended chrome config
Based on facebook's blog posts and deprecation warnings
react-addons-transition-group
toreact-transition-group/TransitionGroup
react-addons-css-transition-group
toreact-transition-group/CSSTransitionGroup
react-addons-update
toimmutability-helper
react-addons-test-utils
toreact-dom/test-utils
react-addons-linked-state-mixin
react-addons-create-fragment
react-addons-pure-render-mixin
react-addons-perf
require("create-react-class")
if we use that rather than ES6. In React_UJS perhaps?Fixes #790
This PR is very unlikely to be backwards compatible with React 15