Skip to content

Commit

Permalink
tiny improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
mweststrate committed Jan 2, 2017
1 parent 31ac9b8 commit ca734ad
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/core/globalstate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class MobXGlobals {
* MobX compatiblity with other versions loaded in memory as long as this version matches.
* It indicates that the global state still stores similar information
*/
version = 4;
version = 5;

/**
* Currently running derivation
Expand Down
2 changes: 1 addition & 1 deletion src/core/observable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export function queueForUnobservation(observable: IObservable) {
}

/**
* Batch is a pseudotransaction, just for purposes of memoizing ComputedValues when nothing else does.
* Batch starts a transaction, at least for purposes of memoizing ComputedValues when nothing else does.
* During a batch `onBecomeUnobserved` will be called at most once per observable.
* Avoids unnecessary recalculations.
*/
Expand Down
2 changes: 0 additions & 2 deletions src/core/reaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ export class Reaction implements IDerivation, IReactionPublic {
if (!this._isScheduled) {
this._isScheduled = true;
globalState.pendingReactions.push(this);
startBatch();
runReactions();
endBatch();
}
}

Expand Down

0 comments on commit ca734ad

Please sign in to comment.