Skip to content

fix recipe import placeholders in docs recipes#3310

Closed
Bojun-Vvibe wants to merge 1 commit into
pmndrs:mainfrom
Bojun-Vvibe:agent/pmndrs_jotai-1776712173
Closed

fix recipe import placeholders in docs recipes#3310
Bojun-Vvibe wants to merge 1 commit into
pmndrs:mainfrom
Bojun-Vvibe:agent/pmndrs_jotai-1776712173

Conversation

@Bojun-Vvibe
Copy link
Copy Markdown

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 atomWithToggle and atomWithToggleAndStorage recipes now import from local recipe modules, and the atomWithCompare recipe now imports from its local module and includes an inline shallowEquals helper 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_modules is absent), and this is a docs-only change.

Risk

Low / Docs-only change that narrows ambiguity in example code without affecting runtime behavior.

@codesandbox-ci
Copy link
Copy Markdown

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.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
jotai Ready Ready Preview, Comment Apr 20, 2026 7:13pm

Request Review

@Bojun-Vvibe Bojun-Vvibe closed this by deleting the head repository Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants