/rn-developer-skills:state-and-datafrom React Native Developer Skills
Reviews server state, caching, offline, and transaction handling in React Native apps. Provides checklists for data fetching, stale-while-revalidate, network transitions, and critical actions like payments.
Ships in React Native Developer Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Keep server data in one cache. That cache may be the store the app already uses.
useState that can drift from the cacheIncorrect:
const [users, setUsers] = useState([]);
useEffect(() => {
fetch('/api/users').then(r => r.json()).then(setUsers);
}, []);
Correct:
const users = readFromAppCache('users', () => api.getUsers());
Dirty form input, validation, and unsaved-change prompts are owned by forms-and-validation.
Incorrect:
// No timeout — hangs forever on a slow network
const data = await fetch('/api/items');
Correct:
const controller = new AbortController();
const timeout = setTimeout(() => controller.abort(), 10000);
try {
const data = await fetch('/api/items', { signal: controller.signal });
} catch (e) {
if (e.name === 'AbortError') showTimeout();
else showError(e);
} finally {
clearTimeout(timeout);
}
Incorrect:
const onPay = async () => {
await paymentSDK.charge(amount);
navigation.navigate('Success'); // assumes success from the SDK alone
};
Correct:
const onPay = async () => {
const sdkResult = await paymentSDK.charge(amount);
const confirmed = await api.confirmPayment(sdkResult.transactionId);
if (confirmed.status === 'success') {
navigation.navigate('Success');
} else {
navigation.navigate('PaymentFailed', { reason: confirmed.reason });
}
};
| Anti-Pattern | Risk | Fix |
|---|---|---|
A second useState copy of server data | The screen and the cache disagree | Read from the one cache the app already uses |
| A second store that copies each server response | The two copies drift | Read from that same cache |
| Fetching inside the component | No shared cache, repeated requests | Read through the app cache |
| Fire-and-forget async | Silent failures | Always handle errors |
| Auto-retry POST on reconnect | Duplicate transactions | Retry only idempotent reads |
AbortController on unmount triggers a state update on an unmounted component.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub neha/rn-developer-skills --plugin rn-developer-skills19 skills in this plugin
/accessibilityReview React Native code for screen-reader support, labels and roles, touch targets, focus order, colour contrast, and dynamic type. Use when building UI, reviewing components, or auditing a screen for accessibility./architectureReview and structure React Native features for folder layout, navigation, deep links, startup order, and safe area. Use when designing a new feature, reviewing structure, or isolating crashes./code-reviewAudit entry point for reviewing React Native code. Applies crash and data-loss rules on every change, and opens a focused skill only when the diff touches that concern./conventionsBaseline React Native project conventions for structure, TypeScript, naming, file size, and hygiene. Use when setting up a project, writing new code, or reviewing for consistency./critical-rulesNon-negotiable React Native crash and secret checks. Use on every change, and only on lines the diff touches./error-handlingGuide error boundaries, API failure UI, retry flows, and global handlers in React Native. Use when adding error recovery, reviewing failure states, or preventing silent failures.Other plugins' skills for the same job