File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -6,16 +6,16 @@ export default class Dispatcher {
66 constructor ( store ) {
77 this . perform = this . perform . bind ( this ) ;
88 this . store = store ;
9- this . hydrate ( ) ;
9+ this . initialize ( ) ;
1010 }
1111
12- hydrate ( { atom, subscriptions = [ ] } = { } ) {
12+ initialize ( { atom, subscriptions = [ ] } = { } ) {
1313 this . atom = atom ;
1414 this . subscriptions = subscriptions ;
1515 this . dispatch ( { } ) ;
1616 }
1717
18- dehydrate ( ) {
18+ dispose ( ) {
1919 const { atom, subscriptions } = this ;
2020 delete this . atom ;
2121 this . subscriptions = [ ] ;
Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ export default class Provider {
2525 }
2626
2727 componentWillReceiveProps ( nextProps ) {
28- nextProps . dispatcher . hydrate (
29- this . props . dispatcher . dehydrate ( )
28+ nextProps . dispatcher . initialize (
29+ this . props . dispatcher . dispose ( )
3030 ) ;
3131 }
3232
Original file line number Diff line number Diff line change @@ -6,8 +6,9 @@ export default function createDispatcher(...args) {
66 return {
77 subscribe : ::dispatcher . subscribe ,
88 perform : ::dispatcher . perform ,
9- hydrate : ::dispatcher . hydrate ,
10- dehydrate : ::dispatcher . dehydrate ,
11- getAtom : ::dispatcher . getAtom
9+ getAtom : ::dispatcher . getAtom ,
10+ setAtom : ::dispatcher . setAtom ,
11+ initialize : ::dispatcher . initialize ,
12+ dispose : ::dispatcher . dispose
1213 } ;
1314}
You can’t perform that action at this time.
0 commit comments