Permalink
Browse files

my first hello world with ReactJS!

  • Loading branch information...
pietro909 committed Sep 19, 2016
0 parents commit a8839d5374d929f87d9b92cd7f900db8a7fdc60f
Showing with 79 additions and 0 deletions.
  1. +13 −0 App.jsx
  2. +14 −0 index.html
  3. +5 −0 main.js
  4. +18 −0 package.json
  5. +29 −0 webpack.config.js
13 App.jsx
@@ -0,0 +1,13 @@
import React from 'react';
class App extends React.Component {
render() {
return (
<div>
hello World!!!
</div>
);
}
}
export default App;
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>React App</title>
</head>
<body>
<div id="app"></div>
<script src="index.js"></script>
</body>
</html>
@@ -0,0 +1,5 @@
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App.jsx';
ReactDOM.render(<App />, document.getElementById('app'));
@@ -0,0 +1,18 @@
{
"name": "react-first-app",
"version": "0.0.1",
"description": "my first react app",
"main": "index.js",
"scripts": {
"start": "webpack-dev-server --hot",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"react": "^15.3.1",
"react-dom": "^15.3.1",
"webpack": "^2.1.0-beta.22",
"webpack-dev-server": "^1.16.1"
}
}
@@ -0,0 +1,29 @@
var config = {
entry: './main.js',
output: {
path:'./',
filename: 'index.js',
},
devServer: {
inline: true,
port: 8080
},
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel',
query: {
presets: ['react']
}
}
]
}
}
module.exports = config;

0 comments on commit a8839d5

Please sign in to comment.