- observableArray.sort no longer mutates the array being sorted but returns a sorted clone instead (#90)
- removed an incorrect internal state assumption (#97)
- Add bower support
- Computed value now yields consistent results when being inspected while in transaction
- Implemented #67: Reactive graph transformations. See: http://mweststrate.github.io/mobservable/refguide/create-transformer.html
- Implemented #59,
isObservable
andobserve
now support a property name as second param to observe individual values on maps and objects.
- Fixed #77: package consumers with --noImplicitAny should be able to build
- Introduced
mobservable.fastArray(array)
, in addition tomobservable.observable(array)
. Which is much faster when adding items but doesn't support enumerability (for (var idx in ar) ..
loops). - Introduced
observableArray.peek()
, for fast access to the array values. Should be used read-only.
- Fixed 71: transactions should not influence running computations
- Fixed #65; illegal state exception when using a transaction inside a reactive function. Credits: @kmalakoff
- Fixed #61; if autorun was created during a transaction, postpone execution until the end of the transaction
- Fixed exception when autorunUntil finished immediately
toJSON
now serializes object trees with cycles as well. If you know the object tree is acyclic, pass infalse
as second parameter for a performance gain.
- Exposed
ObservableMap
type - Introduced
mobservable.untracked(block)
- Introduced
mobservable.autorunAsync(block, delay)
Removed accidental log message
Fixed inconsistency when using transaction
and @observer
, which sometimes caused stale values to be displayed.
Fix incompatibility issue with systemjs bundler (see PR 52)
map.size
is now a property instead of a functionmap()
now accepts an array as entries to construct the new map- introduced
isObservableObject
,isObservableArray
andisObservableMap
- introduced
observe
, to observe observable arrays, objects and maps, similarly to Object.observe and Array.observe
extendObservable
now supports passing in multiple object properties
- added
mobservable.map()
, which creates a new map similarly to ES6 maps, yet observable. Until properly documentation, see the MDN docs.
- Stricter argument checking for several api's.
isReactive
->isObservable
makeReactive
->observable
extendReactive
->extendObservable
observe
->autorun
observeUntil
->autorunUntil
observeAsync
->autorunAsync
reactiveComponent
->observer
(inmobservable-react
package)
- dropped the
strict
andlogLevel
settings of mobservable. View functions are by default run instrict
mode,autorun
(formerly:observe
) functions innon-strict
mode (strict indicates that it is allowed to change other observable values during the computation of a view funtion). Useextras.withStrict(boolean, block)
if you want to deviate from the default behavior. observable
(formerlymakeReactive
) no longer accepts an options object. The modifiersasReference
,asStructure
andasFlat
can be used instead.- dropped the
default
export of observable - Removed all earlier deprecated functions
mobservable
now ships with TypeScript 1.6 compliant module typings, no external typings file is required anymore.mobservable-react
supports React Native as well through the import"mobservable-react/native"
.- Improved debugger support
for (var key in observablearray)
now lists the correct keys@observable
now works correct on classes that are transpiled by either TypeScript or Babel (Not all constructions where supported in Babel earlier)- Simplified error handling, mobservable will no longer catch errors in views, which makes the stack traces easier to debug.
- Removed the initial 'welcom to mobservable' logline that was printed during start-up.
- Backported Babel support for the @observable decorator from the 1.0 branch. The decorator should now behave the same when compiled with either Typescript or Babeljs.
- Introduced
strict
mode (see issues #30, #31) - Renamed
sideEffect
toobserve
- Renamed
when
toobserveUntil
- Introduced
observeAsync
. - Fixed issue where changing the
logLevel
was not picked up. - Improved typings.
- Introduces
asStructure
(see #8) andasFlat
. - Assigning a plain object to a reactive structure no longer clones the object, instead, the original object is decorated. (Arrays are still cloned due to Javascript limitations to extend arrays).
- Reintroduced
expr(func)
as shorthand formakeReactive(func)()
, which is useful to create temporarily views inside views - Deprecated the options object that could be passed to
makeReactive
. - Deprecated the options object that could be passed to
makeReactive
:- A
thisArg
can be passed as second param. - A name (for debugging) can be passed as second or third param
- The
as
modifier is no longer needed, useasReference
(instead ofas:'reference'
) orasFlat
(instead ofrecurse:false
).
- A
- Fixed issue where @observable did not properly create a stand-alone view
- Fixed bug where views where sometimes not triggered again if the dependency tree changed to much.
- Introduced
when
, which, given a reactive predicate, observes it until it returns true. - Renamed
sideEffect -> observe
- Improved logging
- Deprecated observable array
.values()
and.clone()
- Deprecated observeUntilInvalid; use sideEffect instead
- Renamed mobservable.toJson to mobservable.toJSON
- It is no longer possible to create impure views; views that alter other reactive values.
- Update links to the new documentation.
- 2nd argument of sideEffect is now the scope, instead of an options object which hadn't any useful properties
- Deprecated: reactiveComponent, reactiveComponent from the separate package mobservable-react should be used instead
- Store the trackingstack globally, so that multiple instances of mobservable can run together
- Deprecated: @observable on functions (use getter functions instead)
- Introduced:
getDependencyTree
,getObserverTree
andtrackTransitions
- Minor performance improvements