Skip to content

Commit 2def6c1

Browse files
committed
updated readme
1 parent 5322aa2 commit 2def6c1

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

README.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,24 @@ install through ``npm i vua-redux --save``
66
## Initialize
77
install in your root component
88

9+
```js
10+
// main.js
11+
import Vue from 'vue';
12+
import { reduxStorePlugin } from 'vua-redux';
13+
import AppStore from './AppStore';
14+
import App from './Component/App';
15+
16+
// install vua-redux
17+
Vue.use(reduxStorePlugin);
18+
19+
new Vue({
20+
store: AppStore,
21+
render(h) {
22+
return <App />
23+
}
24+
});
25+
```
26+
927
```js
1028
// store.js
1129
import { createStore } from 'redux';
@@ -32,23 +50,6 @@ const AppStore = createStore(reducer);
3250
export default AppStore;
3351
```
3452

35-
```js
36-
// main.js
37-
import Vue from 'vue';
38-
import { reduxStorePlugin } from 'vua-redux';
39-
import AppStore from './AppStore';
40-
import App from './Component/App';
41-
42-
Vue.use(reduxStorePlugin);
43-
44-
new Vue({
45-
store: AppStore,
46-
render(h) {
47-
return <App />
48-
}
49-
});
50-
```
51-
5253
## Use in your component
5354
```js
5455
// components/App.js

0 commit comments

Comments
 (0)