Xstate: Maintain code examples in this repo and show it through embedding

Created on 20 Sep 2018  路  9Comments  路  Source: davidkpiano/xstate

Bug or feature request?

Feature request

Description:

The better way to maintain code examples is to have it in this repo, so anyone can modify it and submit a PR.

Potential implementation:

The implementation might be to have all code examples in docs/examples folder. AFAIK Codepen doesn't have a way to import Github repos, so I recommend using Stackblitz or CodeSandbox for that, see:

Stackblitz Github Import
CodeSandbox Github Import

I can contribute with this implementation, so let me know your thoughts.

documentation

Most helpful comment

Embedded examples through CodeSandbox: https://xstate.js.org/docs/examples/todomvc.html

You can open a pull request directly to master to add your own. 馃殌

All 9 comments

I'd love help with this. I'm planning on rewriting the docs using Gatsby + MDX.

Great! I'll start working on it this weekend.

I'd be keen to help rewrite documentation using Gatsby + MDX.

I'd be keen to help rewrite documentation using Gatsby + MDX.

Currently wrestling with that now. I thought it was a good idea but MDX support doesn't seem mature in Gatsby yet.

See #184 , here a live demo.

Embedded examples through CodeSandbox: https://xstate.js.org/docs/examples/todomvc.html

You can open a pull request directly to master to add your own. 馃殌

Wow! that's great 馃敟

Nice! Do you want the examples to strictly use XState or could they include an interpreter not from XState source?

They can use any interpreter.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jfun picture jfun  路  3Comments

doup picture doup  路  3Comments

mattiamanzati picture mattiamanzati  路  3Comments

hnordt picture hnordt  路  3Comments

ifokeev picture ifokeev  路  3Comments