Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #239 from opencomponents/react
Browse files Browse the repository at this point in the history
[DX-523] Upgrade react to 16.4.0
  • Loading branch information
nickbalestra committed Jun 7, 2018
2 parents 0e3a409 + 8ba05b5 commit 15d5d11
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ Object {
}
`;

exports[`valid component 2`] = `"var oc=oc||{};oc.components=oc.components||{};oc.components['dummyData']=function(model){ var modelHTML = model.__html ? model.__html : ''; var staticPath = model.reactComponent.props._staticPath; var props = JSON.stringify(model.reactComponent.props); return '<div id=\\"oc-reactRoot-react-component\\" class=\\"oc-reactRoot-react-component\\">' + modelHTML + '</div>' + '' + '<script>' + 'window.oc = window.oc || {};' + 'oc.cmd = oc.cmd || [];' + 'oc.cmd.push(function(oc){' + '' + 'oc.requireSeries([{\\"global\\":\\"PropTypes\\",\\"url\\":\\"https://unpkg.com/prop-types@15.6.1/prop-types.min.js\\",\\"name\\":\\"prop-types\\"},{\\"global\\":\\"React\\",\\"url\\":\\"https://unpkg.com/react@16.3.2/umd/react.production.min.js\\",\\"name\\":\\"react\\"},{\\"global\\":\\"ReactDOM\\",\\"url\\":\\"https://unpkg.com/react-dom@16.3.2/umd/react-dom.production.min.js\\",\\"name\\":\\"react-dom\\"}], function(){' + 'oc.require(' + '[\\"oc\\", \\"reactComponents\\", \\"dummyContent\\"],' + '\\"' + staticPath + 'react-component.js\\",' + 'function(ReactComponent){' + 'var targetNode = document.getElementById(\\"oc-reactRoot-react-component\\");' + 'targetNode.setAttribute(\\"id\\",\\"\\");' + 'ReactDOM.render(React.createElement(ReactComponent,' + props + '),targetNode);' + '}' + ');' + '});' + '});' + '</script>' }"`;
exports[`valid component 2`] = `"var oc=oc||{};oc.components=oc.components||{};oc.components['dummyData']=function(model){ var modelHTML = model.__html ? model.__html : ''; var staticPath = model.reactComponent.props._staticPath; var props = JSON.stringify(model.reactComponent.props); return '<div id=\\"oc-reactRoot-react-component\\" class=\\"oc-reactRoot-react-component\\">' + modelHTML + '</div>' + '' + '<script>' + 'window.oc = window.oc || {};' + 'oc.cmd = oc.cmd || [];' + 'oc.cmd.push(function(oc){' + '' + 'oc.requireSeries([{\\"global\\":\\"PropTypes\\",\\"url\\":\\"https://unpkg.com/prop-types@15.6.1/prop-types.min.js\\",\\"name\\":\\"prop-types\\"},{\\"global\\":\\"React\\",\\"url\\":\\"https://unpkg.com/react@16.4.0/umd/react.production.min.js\\",\\"name\\":\\"react\\"},{\\"global\\":\\"ReactDOM\\",\\"url\\":\\"https://unpkg.com/react-dom@16.4.0/umd/react-dom.production.min.js\\",\\"name\\":\\"react-dom\\"}], function(){' + 'oc.require(' + '[\\"oc\\", \\"reactComponents\\", \\"dummyContent\\"],' + '\\"' + staticPath + 'react-component.js\\",' + 'function(ReactComponent){' + 'var targetNode = document.getElementById(\\"oc-reactRoot-react-component\\");' + 'targetNode.setAttribute(\\"id\\",\\"\\");' + 'ReactDOM.render(React.createElement(ReactComponent,' + props + '),targetNode);' + '}' + ');' + '});' + '});' + '</script>' }"`;
2 changes: 1 addition & 1 deletion packages/oc-template-react-compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"postcss-import": "^11.0.0",
"postcss-loader": "^2.0.9",
"prop-types": "15.6.1",
"react": "16.3.2",
"react": "16.4.0",
"webpack": "^4.8.3"
},
"files": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ Object {
Object {
"global": "React",
"name": "react",
"url": "https://unpkg.com/react@16.3.2/umd/react.production.min.js",
"url": "https://unpkg.com/react@16.4.0/umd/react.production.min.js",
},
Object {
"global": "ReactDOM",
"name": "react-dom",
"url": "https://unpkg.com/react-dom@16.3.2/umd/react-dom.production.min.js",
"url": "https://unpkg.com/react-dom@16.4.0/umd/react-dom.production.min.js",
},
],
"type": "oc-template-react",
Expand Down
8 changes: 4 additions & 4 deletions packages/oc-template-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"nice-cache": "0.0.5",
"oc-generic-template-renderer": "2.0.4",
"prop-types": "15.6.1",
"react": "16.3.2",
"react-dom": "16.3.2"
"react": "16.4.0",
"react-dom": "16.4.0"
},
"files": [
"lib",
Expand All @@ -43,11 +43,11 @@
},
"react": {
"global": "React",
"url": "https://unpkg.com/react@16.3.2/umd/react.production.min.js"
"url": "https://unpkg.com/react@16.4.0/umd/react.production.min.js"
},
"react-dom": {
"global": "ReactDOM",
"url": "https://unpkg.com/react-dom@16.3.2/umd/react-dom.production.min.js"
"url": "https://unpkg.com/react-dom@16.4.0/umd/react-dom.production.min.js"
}
}
}

0 comments on commit 15d5d11

Please sign in to comment.