vercel-react-native-skills
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
Install
npx skills add https://github.com/vercel-labs/agent-skills --skill vercel-react-native-skills- title
- Never Use && with Potentially Falsy Values
- impact
- CRITICAL
- impactDescription
- prevents production crash
- tags
- rendering, conditional, jsx, crash
Never Use && with Potentially Falsy Values
Never use {value && <Component />} when value could be an empty string or
0. These are falsy but JSX-renderable—React Native will try to render them as
text outside a <Text> component, causing a hard crash in production.
Incorrect (crashes if count is 0 or name is ""):
Correct (ternary with null):
Correct (explicit boolean coercion):
Best (early return):
Early returns are clearest. When using conditionals inline, prefer ternary or explicit boolean checks.
Lint rule: Enable react/jsx-no-leaked-render from
eslint-plugin-react
to catch this automatically.