Skip to content

Commit 783221f

Browse files
committed
Correct mistake made in #281830
1 parent 79cd7e1 commit 783221f

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
"webpack": "^2.3.3"
1515
},
1616
"dependencies": {
17-
"react_ujs": "^2.6.1"
17+
"react_ujs": "^2.6.0"
1818
}
1919
}

test/dummy_webpacker3/app/javascript/components/TodoListWithConsoleLog.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ module.exports = createReactClass({
66
console.log('got initial state');
77
return({mounted: "nope"});
88
},
9-
componentDidMount: function() {
9+
componentWillMount: function() {
10+
// This will need to be replaced
11+
// https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html
1012
console.warn('mounted component');
1113
this.setState({mounted: 'yep'});
1214
},

test/dummy_webpacker3/app/javascript/components/WithSetTimeout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ var React = require("react")
22
var createReactClass = require("create-react-class")
33

44
module.exports = createReactClass({
5-
componentDidMount: function () {
5+
componentWillMount: function () {
66
setTimeout(function () {}, 1000)
77
clearTimeout(0)
88
},

0 commit comments

Comments
 (0)