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-ngrequires importing specifically the files that you use (e.g.
import Store from 'alt-ng/Store'). This avoids including
AltContainerin your application if you are not using it.
loadhave been removed from
Alt. We encourage people to implement their own solutions adapted to their needs (see Store initial state).
configargument of the Alt constructor has been removed.
alt.generateActionshae been merged into a single
namespaceis now required when creating Actions, and the order of arguments in
alt.createActionsis switched (
namespaceis now the first attribute).
bootstrapfeature has been replaced with a Store initial state pattern
Store.on()has been removed). Specifically, error handlers used to be able to silently catch exceptions while dispatching.
displayNameis now required when creating Stores, and the syntax of arguments in
alt.createStore(), and all state must be stored in the
alt-ngwill inject Storage state directly as properties to child entities, where
altused to inject the stores themselves.
AltContainerimplementation would detect if there is a single child, and generate no parent Element in this case.
alt-ngwill always generate a parent element.
AltContainerwould pass any properties to its children. This implementation will only pass Store state, and use the properties only on the parent Element.