Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 405 Bytes

prepare.md

File metadata and controls

22 lines (17 loc) · 405 Bytes
layout title description permalink
docs
Prepare
Prepare a payload for bootstrapping
/docs/prepare/

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);