diff --git a/package.json b/package.json index bedcb96..03353be 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "watch": "watchify -t [ babelify --presets [ react ] ] ./src/index.js -o ./build/bundle.js" + "watch": "watchify -t [ babelify --presets [ react es2015 ] ] ./src/index.js -o ./build/bundle.js" }, "repository": { "type": "git", @@ -22,12 +22,13 @@ }, "homepage": "https://github.com/MontpellierJS/react-intro#readme", "dependencies": { - "babel-preset-react": "^6.3.13", - "babelify": "^7.2.0", "react": "^0.14.6", "react-dom": "^0.14.6" }, "devDependencies": { + "babel-preset-es2015": "^6.3.13", + "babel-preset-react": "^6.3.13", + "babelify": "^7.2.0", "watchify": "^3.7.0" } } diff --git a/src/components/TodoApp.js b/src/components/TodoApp.js index 201c0ff..cf942e2 100644 --- a/src/components/TodoApp.js +++ b/src/components/TodoApp.js @@ -1,11 +1,9 @@ -var React = require('react'); +import React from 'react' -function TodoApp(props) { +export default function TodoApp(props) { return (