Skip to content

Instantly share code, notes, and snippets.

@pahund
Last active October 14, 2018 20:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pahund/5f2e3685100beda361e0ec05600078bf to your computer and use it in GitHub Desktop.
Save pahund/5f2e3685100beda361e0ec05600078bf to your computer and use it in GitHub Desktop.
Creating an application's initial state, including a Brick's initial state
import { createInitialState as createInitialHackerNewsState } from '@modular-toolkit/demo-module';
export default config => ({
cookieDomain: config.cookieDomain,
bricks: {
hackerNews: createInitialHackerNewsState({
topStories: [
/* …some top stories data objects… */
]
})
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment