Skip to content

Commit 02e8ea3

Browse files
committed
added upgrade instructions
1 parent 0400e4e commit 02e8ea3

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

upgrade.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Prior to `1.0`, icrementing the second decimal place indicates a potential breaking change.
2+
3+
**0.8.x to 0.9.x**
4+
5+
- Stores are now singletons. The dispatcher's `getStores` method must go from...
6+
```javascript
7+
getStores: function ()
8+
return{
9+
myStore: MyStore()
10+
}
11+
}
12+
```
13+
to...
14+
```javascript
15+
getStores: function ()
16+
return{
17+
myStore: MyStore
18+
}
19+
}
20+
```
21+
where `MyStore` is the output of `Flux.createStore`
22+
23+
- Scheme values are now set on a `store.state` object rather than directly on the store itself. If you are using `scheme`, and accessing and scheme properties directly within a store (rather than just through `this.set`), you will need to update your code to access the property from the `state` object...
24+
```javascript
25+
this.mySchemeProp.push(newValue);
26+
```
27+
needs to become...
28+
```javascript
29+
this.state.mySchemeProp.push(newValue);
30+
```

0 commit comments

Comments
 (0)