Skip to content

Commit b4e3805

Browse files
committed
feat(store): add easyStore export, refactor example build process
1 parent a3a5be9 commit b4e3805

20 files changed

+25323
-2939
lines changed

dist/easyState.js

Lines changed: 108 additions & 108 deletions
Large diffs are not rendered by default.

dist/todoMVC.js

Lines changed: 309 additions & 908 deletions
Large diffs are not rendered by default.

dist/helloWorld.js renamed to examples/dist/helloWorld.js

Lines changed: 928 additions & 917 deletions
Large diffs are not rendered by default.

dist/simpleTodos.js renamed to examples/dist/simpleTodos.js

Lines changed: 931 additions & 917 deletions
Large diffs are not rendered by default.

examples/dist/todoMVC.js

Lines changed: 22934 additions & 0 deletions
Large diffs are not rendered by default.

examples/helloWorld/App.jsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
import React, { Component } from 'react'
22
import ReactDOM from 'react-dom'
3-
import easyState from '../../src/easyState'
3+
import { easyComp } from 'react-easy-state'
44

5-
@easyState
5+
@easyComp
66
class App extends Component {
77
render() {
8-
const { name } = this.state
9-
108
return (
119
<div>
1210
<div>Name: <input onChange={this.updateName}/></div>
13-
<p>Your name is: {name}</p>
11+
<p>Your name is: {this.state.name}</p>
1412
</div>
1513
)
1614
}

examples/helloWorld/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
</head>
44
<body>
55
<div id="react-root"></div>
6-
<script src="../../dist/helloWorld.js"></script>
6+
<script src="../dist/helloWorld.js"></script>
77
</body>

examples/package.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"description": "React Easy State examples",
3+
"author": {
4+
"name": "Miklos Bertalan",
5+
"email": "miklos.bertalan@risingstack.com"
6+
},
7+
"dependencies": {
8+
"classnames": "2.2.5",
9+
"react": "15.5.4",
10+
"react-dom": "15.5.4",
11+
"react-easy-state": "1.0.4"
12+
},
13+
"devDependencies": {
14+
"babel-core": "6.24.1",
15+
"babel-loader": "7.0.0",
16+
"babel-plugin-transform-decorators-legacy": "1.3.4",
17+
"babel-preset-es2015": "6.24.1",
18+
"babel-preset-react": "6.24.1",
19+
"babel-preset-stage-0": "6.24.1",
20+
"webpack": "2.4.1"
21+
},
22+
"engines": {
23+
"node": ">=6.0.0"
24+
}
25+
}

examples/simpleTodos/App.jsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
import React, { Component } from 'react'
22
import ReactDOM from 'react-dom'
3-
import easyState from '../../src/easyState'
3+
import { easyComp } from 'react-easy-state'
44

5-
@easyState
5+
@easyComp
66
class App extends Component {
7-
constructor () {
8-
super()
9-
this.state = {
10-
todo: '',
11-
todos: []
12-
}
7+
state = {
8+
todo: '',
9+
todos: []
1310
}
1411

1512
render() {

examples/simpleTodos/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
</head>
44
<body>
55
<div id="react-root"></div>
6-
<script src="../../dist/simpleTodos.js"></script>
6+
<script src="../dist/simpleTodos.js"></script>
77
</body>

0 commit comments

Comments
 (0)