dwmkerr / react-es6-starter Goto Github PK
View Code? Open in Web Editor NEWA simple starter template for a React ES6 web app
A simple starter template for a React ES6 web app
Since your blog post, it looks like React has separated out react-dom and deprecated React.render. These are the console errors I get:
Warning: React.render is deprecated. Please use ReactDOM.render from require('react-dom') instead.warning @ bundle.js:9378newFn @ bundle.js:26937(anonymous function) @ bundle.js:7414__webpack_require__ @ bundle.js:20(anonymous function) @ bundle.js:48__webpack_require__ @ bundle.js:20(anonymous function) @ bundle.js:40(anonymous function) @ bundle.js:43
bundle.js:9378 Warning: render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.
The fix is just npm install --save react-dom
and add change app.js to the following:
import React from 'react';
import ReactDOM from 'react-dom';
import Home from './home/home';
ReactDOM.render(<Home />, document.body);
I can create a PR if you want. That still doesn't fix the warning for rendering to the body, but that's a separate issue.
Instead of just downloading this repo (which works great), I tried following your blog post in order to learn the process better. However in the blog, you don't specify Babel 5.x (even though you do in the package.json in this repo), so I ended up with a broken stack because I just installed the latest Babel (6+).
Support Babel@6 is a pretty simple change: https://medium.com/@malyw/how-to-update-babel-5-x-6-x-d828c230ec53#.7xxg7di94. If you're willing to accept it, I can create a pull request.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.