-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
375ec30
commit c56d0bf
Showing
4 changed files
with
46 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
layout: docs | ||
title: Prepare | ||
description: Prepare a payload for bootstrapping | ||
permalink: /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. | ||
|
||
```js | ||
const data = alt.prepare(TodoStore, { | ||
todos: [{ | ||
text: 'Buy some milk' | ||
]} | ||
}); | ||
|
||
alt.bootstrap(data); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters