Skip to content

Commit 1ba1110

Browse files
committed
Stop checking for reactid as createElement doesnt make one
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
1 parent 8ab2c7b commit 1ba1110

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

test/dummy_sprockets/app/assets/javascripts/pages.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ var GreetingMessage = createReactClass({
1313
this.setState({greeting: 'Goodbye'});
1414
},
1515
render: function() {
16-
return React.DOM.div({},
17-
React.DOM.div({}, this.state.greeting, ' ', this.props.name),
18-
React.DOM.button({onClick: this.goodbye}, 'Goodbye')
16+
return React.createElement('div', {},
17+
React.createElement('div', {}, this.state.greeting, ' ', this.props.name ),
18+
React.createElement('button', {onClick: this.goodbye}, 'Goodbye')
1919
);
2020
}
2121
});

test/react/jsx_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
(function() {
1010
var Component;
1111
12-
Component = createReactClass({displayName: "Component",
12+
Component = createReactClass({
1313
render: function() {
1414
return React.createElement(ExampleComponent, {videos:this.props.videos} );
1515
}

test/react/rails/component_mount_test.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,11 @@ class ComponentMountTest < ActionDispatch::IntegrationTest
7373
html = @helper.react_component('Todo', { todo: 'render on the server' }.to_json, prerender: true)
7474
assert(html.include?('data-react-class="Todo"'), 'it includes attrs for UJS')
7575
assert(html.include?('>render on the server</li>'), 'it includes rendered HTML')
76-
assert(html.include?('data-reactid'), 'it includes React properties')
7776
end
7877

7978
test '#react_component passes :static to BundleRenderer' do
8079
html = @helper.react_component('Todo', { todo: 'render on the server' }.to_json, prerender: :static)
8180
assert(html.include?('>render on the server</li>'), 'it includes rendered HTML')
82-
assert(!html.include?('data-reactid'), 'it DOESNT INCLUDE React properties')
8381
end
8482

8583
test '#react_component does not include HTML properties with a static render' do

0 commit comments

Comments
 (0)