layout | title | description | permalink |
---|---|---|---|
docs |
Prepare |
Prepare a payload for bootstrapping |
/docs/prepare/ |
(Store: AltStore, payload: mixed): string
Given a store and a payload this functions returns a serialized string you can use to bootstrap that particular store.
const data = alt.prepare(TodoStore, {
todos: [{
text: 'Buy some milk'
]}
});
alt.bootstrap(data);