Skip to content

Commit

Permalink
feat(RouterStore): Use observable references
Browse files Browse the repository at this point in the history
Instead of converting the store attributes to observable objects just use observable references as
their values are always mutated

BREAKING CHANGE: The store attributes are not @observable anymore but @observable.ref
  • Loading branch information
LeonardoGentile committed Apr 18, 2018
1 parent e6690e7 commit 9f8ef42
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/modules/RouterStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import transitionPath from 'router5-transition-path';

class RouterStore {

@observable route = null;
@observable previousRoute = null;
@observable transitionRoute = null;
@observable transitionError = null;
@observable intersectionNode = '';
@observable toActivate = [];
@observable toDeactivate = [];
@observable.ref route = null;
@observable.ref previousRoute = null;
@observable.ref transitionRoute = null;
@observable.ref transitionError = null;
@observable.ref intersectionNode = '';
@observable.ref toActivate = [];
@observable.ref toDeactivate = [];
// @observable currentView;
router = null;
Expand Down

0 comments on commit 9f8ef42

Please sign in to comment.