fix recipe import placeholders in docs recipes#3310
Closed
Bojun-Vvibe wants to merge 1 commit into
Closed
Conversation
|
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. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Repo: pmndrs/jotai (⭐ 20000)
Type: docs
Files changed: 3
Lines: +8/-4
What
This change fixes three recipe pages that still showed placeholder imports instead of usable example imports. The
atomWithToggleandatomWithToggleAndStoragerecipes now import from local recipe modules, and theatomWithComparerecipe now imports from its local module and includes an inlineshallowEqualshelper so the example is self-contained.Why
The previous snippets were not copy-pasteable because they literally imported from
'XXX'and'YYY'. That makes the published docs misleading at the point where readers are trying to adopt a recipe. Replacing those placeholders with concrete local imports and a small helper makes the examples immediately usable and aligns them with the repo's other recipe docs that import sibling helpers with./....Testing
Verified by reviewing the resulting git diff and confirming the updated snippets are syntactically coherent and consistent with existing recipe documentation patterns. No local formatter or test scripts were run because the cloned repo does not include installed dependencies (
node_modulesis absent), and this is a docs-only change.Risk
Low / Docs-only change that narrows ambiguity in example code without affecting runtime behavior.