-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I've tried updating the react-famous-seed to use the latest React version.
I've managed to get rid of all deprecation warnings by introducing react-dom where required with the following diff
diff --git a/package.json b/package.json
index e950a8e..49cd4fc 100644
--- a/package.json
+++ b/package.json
@@ -18,7 +18,8 @@
"lodash": "^3.5.0",
"merge-stream": "^0.1.7",
"minimist": "^1.1.1",
- "react": "^0.13.1",
+ "react": "^0.14.6",
+ "react-dom": "^0.14.6",
"react-famous": "^0.1.7",
"react-hot-loader": "^1.2.2",
"react-proxy-loader": "^0.3.3",
diff --git a/src/index.html b/src/index.html
index b60de14..a8a769e 100644
--- a/src/index.html
+++ b/src/index.html
@@ -6,6 +6,7 @@
<title>react-famous-seed</title>
</head>
<body>
+ <div id="app"/>
<script src="/_assets/main.js"></script>
</body>
</html>
diff --git a/src/index.js b/src/index.js
index b99560c..e6ab8ea 100644
--- a/src/index.js
+++ b/src/index.js
@@ -4,7 +4,8 @@ import 'famous/inputs/FastClick';
import './lib/overscroll';
import React from 'react';
+import { render } from 'react-dom';
import App from './components/App';
-React.render(React.createElement(App), document.body);
+render(React.createElement(App), document.getElementById('app'));I made some appropriate changes to the Context.js and the FamousUtil.js to use react-dom too
/* Context.js */
/* line 20 */
var ReactDOM = _interopRequire(require("react-dom"));
/* line 44 */
return Engine.createContext(ReactDOM.findDOMNode(this.refs.container));/* FamousUtil.js */
/* line 20 */
var ReactDOMServer = _interopRequire(require("react-dom/server"));
/* line 149 */
return ReactDOMServer.renderToString(obj);I now have no warnings, but nothing is happening.
Any ideas how I can get this running?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels