pmndrs / valtio

💊 Valtio makes proxy-state simple for React and Vanilla
http://valtio.pmnd.rs
MIT License
8.67k stars 241 forks source link

Documentation improvement and support for V2 #869

Closed ScreamZ closed 1 month ago

ScreamZ commented 3 months ago

This is a draft of documentation changes that I will update all along.

Main goal

Currently, Valtio documentation is clumsy in the way that the core API (vanilla) React and utils are mixed.

I'm suggesting splitting core features and adding React Specific, this way the library gets an entry point for a better adoption on NodeJS.

Topics

Need some help

What we should consider

Currently, we are on a custom NextJS stack with mdx, which is kind of heavy, I rather suggest to move on one of:

This way we have access to better built-in components for MDX and a lot of nice tools.

@dai-shi I want your feedback before progressing in a way you're not ok with.

vercel[bot] commented 3 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
valtio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 17, 2024 4:38pm
codesandbox-ci[bot] commented 3 months ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

dai-shi commented 3 months ago

Hi, thanks for working on it!

I have a request. Please don't mix a) an improvement for docs that can apply to v1 and b) a new change for docs that is specific to v2. For a), send a PR to main and we can merge it independent from v2 release.

For doc structure and website, please discuss with @RikuVan and @roguesherlock who built the current docs and website.

My small suggestion is to work on the structure first and the website later. My strong requirement is to separate docs and website, and docs shouldn't depend on any specific tools. Docs should be browsable through GitHub, so we shouldn't rely too much on components and tools that are not available on GitHub.

roguesherlock commented 3 months ago

Hi, thanks for working on it!

I have a request. Please don't mix a) an improvement for docs that can apply to v1 and b) a new change for docs that is specific to v2. For a), send a PR to main and we can merge it independent from v2 release.

For doc structure and website, please discuss with @RikuVan and @roguesherlock who built the current docs and website.

My small suggestion is to work on the structure first and the website later. My strong requirement is to separate docs and website, and docs shouldn't depend on any specific tools. Docs should be browsable through GitHub, so we shouldn't rely too much on components and tools that are not available on GitHub.

Yeah I agree with daishi here,

  1. Any update to the current docs should be a seperate pr so that it can be merged independently
  2. we can work on improving the docs/structure for v2 in a separate branch (v2 maybe?)
  3. I do agree that the current site is a bit bloated. We haven't discussed this but starlight/shiki for the v2 site would be neat. Probably not important right now though as daishi said we should focus on first writing good content (that's the hard part!).
dai-shi commented 3 months ago

I will work on v2 migration guide.

dai-shi commented 3 months ago

I will work on v2 migration guide.

878 is something minimal.