File tree 3 files changed +9
-8
lines changed
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 {
6
6
constructor ( store ) {
7
7
this . perform = this . perform . bind ( this ) ;
8
8
this . store = store ;
9
- this . hydrate ( ) ;
9
+ this . initialize ( ) ;
10
10
}
11
11
12
- hydrate ( { atom, subscriptions = [ ] } = { } ) {
12
+ initialize ( { atom, subscriptions = [ ] } = { } ) {
13
13
this . atom = atom ;
14
14
this . subscriptions = subscriptions ;
15
15
this . dispatch ( { } ) ;
16
16
}
17
17
18
- dehydrate ( ) {
18
+ dispose ( ) {
19
19
const { atom, subscriptions } = this ;
20
20
delete this . atom ;
21
21
this . subscriptions = [ ] ;
Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ export default class Provider {
25
25
}
26
26
27
27
componentWillReceiveProps ( nextProps ) {
28
- nextProps . dispatcher . hydrate (
29
- this . props . dispatcher . dehydrate ( )
28
+ nextProps . dispatcher . initialize (
29
+ this . props . dispatcher . dispose ( )
30
30
) ;
31
31
}
32
32
Original file line number Diff line number Diff line change @@ -6,8 +6,9 @@ export default function createDispatcher(...args) {
6
6
return {
7
7
subscribe : ::dispatcher . subscribe ,
8
8
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
12
13
} ;
13
14
}
You can’t perform that action at this time.
0 commit comments