Permalink
Browse files

Step 2: Introduce React

  • Loading branch information...
hiquest committed Sep 20, 2017
1 parent b092cde commit 115465e223fae992e15471b1205923ed0c04ff9b
Showing with 2,712 additions and 58 deletions.
  1. +33 −0 .eslintrc.js
  2. +6 −1 package.json
  3. +2 −3 src/index.html
  4. +9 −0 src/js/bootstrap.js
  5. +5 −0 src/js/components/app.jsx
  6. +2,657 −54 yarn.lock
@@ -0,0 +1,33 @@
module.exports = {
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
},
"sourceType": "module"
},
"plugins": [
"react"
],
"rules": {
"react/jsx-uses-vars": [2],
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"semi": [
"error",
"always"
]
}
};
@@ -4,9 +4,14 @@
"main": "index.js",
"license": "MIT",
"devDependencies": {
"electron": "^1.7.6"
"electron": "^1.7.6",
"electron-prebuilt-compile": "^1.7.6"
},
"scripts": {
"start": "electron index.js"
},
"dependencies": {
"react": "^15.6.1",
"react-dom": "^15.6.1"
}
}
@@ -5,8 +5,7 @@
<title>ElectroTV</title>
</head>
<body>
<div id='root'>
<h1>Greetings, sir!</h1>
</div>
<div id='root'></div>
<script src='js/bootstrap.js' type='application/javascript'></script>
</body>
</html>
@@ -0,0 +1,9 @@
import React from 'react';
import ReactDOM from 'react-dom';
import App from './js/components/app';
ReactDOM.render(
React.createElement(App),
document.getElementById('root')
);
@@ -0,0 +1,5 @@
import React from 'react';
export default () => (
<div>Hello, React!</div>
);
Oops, something went wrong.

0 comments on commit 115465e

Please sign in to comment.