v2.svelte.dev icon indicating copy to clipboard operation
v2.svelte.dev copied to clipboard

Add store to the repl

Open btakita opened this issue 8 years ago • 3 comments

It would be nice to have some store examples.

btakita avatar Feb 24 '18 23:02 btakita

It also looks like currently the REPL doesn't even compile with store: true, which would be required first. I'm not sure whether it would be best to hardcode that or to provide a control for it. We currently don't have controls for dev or cascade (which are both set to non-default values), so there is precedent, but perhaps not good precedent.

Conduitry avatar Mar 06 '18 04:03 Conduitry

@stalkerg also raised the point that there are links to the REPL from the state management section in the docs, which attempt to run the inline examples, which do not work. I haven't looked through them yet to see which are complete enough to be usable if store: true were set.

Conduitry avatar Mar 06 '18 04:03 Conduitry

Also - for anybody using https://codesandbox.io - can the Store be used there? Using the example code from the docs for importing you obviously can't find the store.js - but how to reference the store in that case?

import { Store } from 'svelte/store.js';

mspanish avatar Mar 18 '18 22:03 mspanish