alt-ng
is based in the original implementation of Alt, an open source project by Josh Perez. For existing Alt applications that are being migrated, these are the main differences that you should be aware of:
alt-ng
requires importing specifically the files that you use (e.g. import Store from 'alt-ng/Store'
). This avoids including AltContainer
in your application if you are not using it.flush
, save
and load
have been removed from Alt
. We encourage people to implement their own solutions adapted to their needs (see Store initial state).config
argument of the Alt constructor has been removed.alt.createAsyncActions
and alt.generateActions
hae been merged into a single alt.createActions
method.namespace
is now required when creating Actions, and the order of arguments in alt.createActions
is switched (namespace
is now the first attribute).bootstrap
feature has been replaced with a Store initial state patternStore.on()
has been removed). Specifically, error handlers used to be able to silently catch exceptions while dispatching.alt-ng/Store
displayName
is now required when creating Stores, and the syntax of arguments in alt.createStore
has changed.alt.createStore()
, and all state must be stored in the state
attribute.alt-ng
will inject Storage state directly as properties to child entities, where alt
used to inject the stores themselves.AltContainer
implementation would detect if there is a single child, and generate no parent Element in this case. alt-ng
will always generate a parent element.AltContainer
would pass any properties to its children. This implementation will only pass Store state, and use the properties only on the parent Element.