Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/holtwood/awesome-cursorrules-zhnpx agentmods add rules/holtwood/awesome-cursorrules-zh/mobx-react-lite-usageWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/holtwood/awesome-cursorrules-zh/mobx-react-lite-usage)<a href="https://agentmods.dev/rules/holtwood/awesome-cursorrules-zh/mobx-react-lite-usage"><img src="https://agentmods.dev/badge/rules/holtwood/awesome-cursorrules-zh/mobx-react-lite-usage/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/holtwood/awesome-cursorrules-zh/mobx-react-lite-usage"><img src="https://agentmods.dev/badge/rules/holtwood/awesome-cursorrules-zh/mobx-react-lite-usage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00556 |
| Opus 5.5 | $0.00000 | $0.00222 |
| Sonnet 5.5 | $0.00000 | $0.00111 |
| Haiku 4.5 | $0.00000 | $0.00056 |
Grade A, and why
mobx-react-lite-usage scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
- 使用 MobX-react-lite 以在函数式组件中获得最佳性能:
observerHOC 或useObserverHook:- 对于函数式组件,推荐使用
mobx-react-lite提供的observer高阶组件(HOC)或useObserverHook 来包裹组件,使其能够响应 MobX 状态的变化。 observerHOC 示例:import React from 'react'; import { observer } from 'mobx-react-lite'; import { useStore } from '../stores'; const TodoList = observer(() => { const { todoStore } = useStore(); return ( <div> {todoStore.todos.map(todo => ( <div key={todo.id}>{todo.text}</div> ))} </div> ); }); export default TodoList;useObserverHook 示例(适用于需要更细粒度控制渲染的场景):import React from 'react'; import { useObserver } from 'mobx-react-lite'; import { useStore } from '../stores'; const TodoItem = ({ todo }) => { return useObserver(() => ( <li> {todo.text} <button onClick={() => todo.toggleCompleted()}> {todo.completed ? 'Mark Incomplete' : 'Mark Complete'} </button> </li> )); }; export default TodoItem;
- 对于函数式组件,推荐使用
- 性能优化:
mobx-react-lite针对函数式组件进行了优化,只在组件实际观察到的数据发生变化时才重新渲染组件,从而最大限度地减少不必要的渲染。- 避免在
observer组件内部解构 MobX store 的可观察属性,这可能导致组件观察到整个 store 而不是特定属性,从而触发不必要的重新渲染。应在组件内部访问具体属性。
- 与 Hooks 结合使用:
mobx-react-lite与 React Hooks 完美结合,可以在observer组件内部自由使用useState,useEffect,useContext等 Hooks。
- 轻量级:
mobx-react-lite是一个轻量级的包,只提供了 MobX 与 React 函数式组件集成的核心功能,没有额外的负担。
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 54 lines · 0 tokens per session scan A 9dfbf6beaa0b
mobx-react-lite-usage is a cursor rule published in the GitHub repository holtwood/awesome-cursorrules-zh (239 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 556 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other cursor rules, from other repositories
semiotic-react-dataviz-cursorrules-prompt-file
Cursor rules for Semiotic data visualization library with 30+ chart types, MCP server, and AI-assisted chart generation.
react-tanstack-router-query-cursorrules-prompt-file
Cursor rules for React SPAs combining TanStack Router v1 and TanStack Query v5 for zero-loading-spinner routing and type-safe server state.
cursorrules-cursor-ai-nextjs-14-tailwind-seo-setup
Cursor rules for Next.js development with Tailwind CSS and SEO optimization.
react-formengine-ai-form-builder-cursorrules-prompt-file
Cursor rules for generating React forms from screenshots, PDFs, HTML, or text descriptions with validated FormEngine JSON schema. Renders through RSuite, Material UI, or Mantine.
react-zustand-cursorrules-prompt-file
React and TypeScript state management guidance for Zustand stores, selectors, middleware, persistence, and testing.
nextjs15-supabase-cursorrules-prompt-file
27 architecture rules preventing AI hallucinations: insecure auth (getSession vs getUser), synchronous params, deprecated imports, missing RLS, and Stripe key exposure. Built for Cursor Agent and Claude Code.