Skip to content
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

React 15.0.1 #512

Merged
merged 2 commits into from
Apr 26, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#### Breaking Changes

#### New Features
- Update to React 15.0.1

#### Deprecation

Expand Down
1 change: 0 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ namespace :react do
copy_react_asset("#{environment}/react-server-with-addons.js", "#{environment}-with-addons/react-server.js")

addons = %w(
addons-clone-with-props
addons-create-fragment
addons-css-transition-group
addons-linked-state-mixin
Expand Down
2 changes: 1 addition & 1 deletion VERSIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You can control what version of React.js (and JSXTransformer) is used by `react-

| Gem | React.js |
|----------|----------|
| master | 0.14.6 |
| master | 15.0.1 |
| 1.6.2 | 0.14.6 |
| 1.6.1 | 0.14.6 |
| 1.6.0 | 0.14.6 |
Expand Down
9 changes: 2 additions & 7 deletions lib/assets/javascripts/react_ujs_mount.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@
var propsJson = node.getAttribute(window.ReactRailsUJS.PROPS_ATTR);
var props = propsJson && JSON.parse(propsJson);

// Prefer ReactDOM if defined (introduced in 0.14)
var renderer = (typeof ReactDOM == "object") ? ReactDOM : React;

renderer.render(React.createElement(constructor, props), node);
ReactDOM.render(React.createElement(constructor, props), node);
}
},

Expand All @@ -72,9 +69,7 @@
for (var i = 0; i < nodes.length; ++i) {
var node = nodes[i];

// Prefer ReactDOM if defined (introduced in 0.14)
var renderer = (typeof ReactDOM == "object") ? ReactDOM : React;
renderer.unmountComponentAtNode(node);
ReactDOM.unmountComponentAtNode(node);
}
}
};
Expand Down
Loading