New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation improvement and support for V2 #869
base: v2
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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. |
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 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. |
@@ -0,0 +1,33 @@ | |||
--- | |||
title: 'useProxy' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a very handy util, but we are still not sure how we should suggest the usage. Our primary hook is useSnapshot
and useProxy
is a wrapper around it.
Yeah I agree with daishi here,
|
I will work on v2 migration guide. |
#878 is something minimal. |
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
subscribe
usage, with and withoutops
+ exampleNeed some help
useProxy
so I just added the JSdoc to a specified section, maybe you could provide some example ? Is it just about having less import and use the proxy and the snapshot in a single hook?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.