useStateMachine icon indicating copy to clipboard operation
useStateMachine copied to clipboard

Documentation discussion

Open devanshj opened this issue 4 years ago • 9 comments

@cassiozen How and where would you want me to write that document covering typescript features? Like maybe in a "Features" section? Or like in a changelog? (that would be lame haha)

And if I'm going to use shiki-twoslash we'd have to host it somewhere. So should we make a documentation website? Or if all this is on low priority I can simply add a wiki page mentioning typescript features with screenshots?

I'm not sure how to go about this haha

devanshj avatar Jul 31 '21 09:07 devanshj

We will need a site at some point, given that GitHub's wiki solution is so poor, but that's not something I could take on immediately.

Do you think you could, for now, use the wiki with screenshots and links to the TypeScript playground?

cassiozen avatar Aug 01 '21 02:08 cassiozen

To be even more specific, I think it would be great to have a Primer, a tl;dr on the readme plus the full article on its own documentation / wiki page.

cassiozen avatar Aug 01 '21 02:08 cassiozen

that's not something I could take on immediately.

No problems!

use the wiki with screenshots and links to the TypeScript playground?

Yep that's not bad, doable

a Primer, a tl;dr on the readme

Yeah my thoughts are similar it's good to point out key-selling features on the readme and then dive into all features in details in a separate place like a wiki page

devanshj avatar Aug 01 '21 09:08 devanshj

As discussed we now have a docusaurus setup under the website folder, with shiki-twoslash configured.

This is not hosted yet, but you can start working there and we will publish it before the final 1.0.0 release

cassiozen avatar Aug 02 '21 22:08 cassiozen

Deployed: https://usestatemachine.js.org/

cassiozen avatar Aug 03 '21 14:08 cassiozen

Looks so cool! Sorry haven't got time to write the documentation (building my blog :P) but will do it asap.

Also make sure to not release v1 with [state, send] or else with sendT feature it would be a breaking change so v1 should be published (if at all you're doing that already) with the return type as...

{ state: ...
, context: ...
, event: ...
, nextEvents: ...
, nextEventsT: ...
, send: ...
}

I'll send a PR making the change

devanshj avatar Aug 03 '21 15:08 devanshj

Yeah, I just copied the current readme. Send the PR and I work on properly splitting and updating the docs.

cassiozen avatar Aug 03 '21 17:08 cassiozen

With that the only thing missing for the 1.0 release will be your article and my video, correct? Am I missing something?

We can target sendT for 1.1 and hierarchical for 1.2

cassiozen avatar Aug 03 '21 17:08 cassiozen

Am I missing something?

Probably not, just types-lite but we can have them for later release

We can target sendT for 1.1 and hierarchical for 1.2

Sure

devanshj avatar Aug 03 '21 18:08 devanshj