hassanzohdy/mongez-react-atom/atoms
Claude Code and agent skill by hassanzohdy/mongez-react-atom
- community
Checking that the SKILL.md file is still in the repository.
How to create atoms and atomCollections in React and use their per-instance hooks (`useValue`, `useState`, `use`, `useWatch`, `Provider`) and custom actions.
Install
npx vskill@latest install hassanzohdy/mongez-react-atom/atomsSKILL.md
Atoms in React
Factory
Naming convention: suffix atom variables withAtom(e.g.counterAtom,userAtom). This prevents name collisions with local variables and plain values, and makes it immediately clear at the call site that you're working with a reactive atom.
atom(...) is the React-aware version of createAtom from @mongez/atom. The returned atom carries all the base methods plus the React hooks below.
The hooks every atom carries
useValue()
Subscribes to changes; returns the current value. Re-renders when the value changes.
useState() — available but not recommended
Returns [value, setValue] — same shape as React's useState, but the value lives in the atom.
The setter accepts an updater function: setCount(prev => prev + 1).
Prefer `useValue()` + calling the atom's methods directly — it keeps updates explicit and traceable:
use(key)
For object atoms: subscribes to ONE key only. Re-renders only when THAT key changes — sibling keys in the same atom don't wake this component.
useWatch(key, callback)
Effect-style watcher. Use when you want a side effect (analytics, logging) without re-rendering. useWatch is itself a hook — call it at the top of your component, NOT inside a useEffect.
Provider
A React component that sets the atom's value on mount and updates it when value prop changes.
Useful for testing (inject a known value into the subtree) and for "set on mount" patterns.
Custom actions in React atoms
Action methods declared in the factory still work — they're bound to the atom instance, available globally.
With store scoping (SSR)
The per-atom hooks (useValue, useState, use, useWatch) ALREADY do this resolution internally — you don't need to call useAtom(template) explicitly unless you're invoking action methods on the scoped clone from an event handler. See `../ssr/SKILL.md`.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/atoms/SKILL.md
Popularity
- Repository stars
- 9
- Repository forks
- 2
- Repository npm downloads, 7 days
- 60
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 15 Jul 2026, 3 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/hassanzohdy/mongez-react-atom/atoms)