react-on-rails
Advanced tools
Comparing version 6.10.1 to 7.0.0
# Change Log | ||
All notable changes to this project's source code will be documented in this file. Items under `Unreleased` is upcoming features that will be out in next version. | ||
All notable changes to this project's source code will be documented in this file. Items under `Unreleased` is upcoming features that will be out in next version. NOTE: major versions of the npm module and the gem must be kept in sync. | ||
@@ -7,2 +7,9 @@ Contributors: please follow the recommendations outlined at [keepachangelog.com](http://keepachangelog.com/). Please use the existing headings and styling as a guide, and add a link for the version diff at the bottom of the file. Also, please update the `Unreleased` link to compare to the latest release version. | ||
## [Unreleased] | ||
## [7.0.0] - 2017-04-25 | ||
### Changed | ||
- Any version differences in gem and node package for React on Rails throw an error [#821](https://github.com/shakacode/react_on_rails/pull/821) by [justin808](https://github.com/justin808) | ||
### Fixed | ||
- Fixes serious performance regression when using String props for rendering. [#821](https://github.com/shakacode/react_on_rails/pull/821) by [justin808](https://github.com/justin808) | ||
## [6.10.1] - 2017-04-23 | ||
@@ -538,3 +545,4 @@ ### Fixed | ||
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/6.10.1...master | ||
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/7.0.0...master | ||
[7.0.0]: https://github.com/shakacode/react_on_rails/compare/6.10.1...7.0.0 | ||
[6.10.1]: https://github.com/shakacode/react_on_rails/compare/6.10.0...6.10.1 | ||
@@ -541,0 +549,0 @@ [6.10.0]: https://github.com/shakacode/react_on_rails/compare/6.9.3...6.10.0 |
@@ -118,2 +118,6 @@ 'use strict'; | ||
function domNodeIdForEl(el) { | ||
return el.getAttribute('data-dom-id'); | ||
} | ||
/** | ||
@@ -126,7 +130,7 @@ * Used for client rendering by ReactOnRails. Either calls ReactDOM.render or delegates | ||
var context = findContext(); | ||
var jsonEl = JSON.parse(el.textContent); | ||
var name = jsonEl.component_name; | ||
var domNodeId = jsonEl.dom_id; | ||
var props = jsonEl.props; | ||
var trace = jsonEl.trace; | ||
// This must match app/helpers/react_on_rails_helper.rb:113 | ||
var name = el.getAttribute('data-component-name'); | ||
var domNodeId = domNodeIdForEl(el); | ||
var props = JSON.parse(el.textContent); | ||
var trace = el.getAttribute('data-trace'); | ||
@@ -179,6 +183,9 @@ try { | ||
function unmount(el) { | ||
var elData = JSON.parse(el.textContent); | ||
var domNodeId = elData.dom_id; | ||
var domNodeId = domNodeIdForEl(el); | ||
var domNode = document.getElementById(domNodeId); | ||
_reactDom2.default.unmountComponentAtNode(domNode); | ||
try { | ||
_reactDom2.default.unmountComponentAtNode(domNode); | ||
} catch (e) { | ||
console.info('Caught error calling unmountComponentAtNode: ' + e.message + ' for domNode', domNode, e); | ||
} | ||
} | ||
@@ -185,0 +192,0 @@ |
{ | ||
"name": "react-on-rails", | ||
"version": "6.10.1", | ||
"version": "7.0.0", | ||
"description": "react-on-rails JavaScript for react_on_rails Ruby gem", | ||
@@ -5,0 +5,0 @@ "main": "node_package/lib/ReactOnRails.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
125952
833