React Native coding conventions covering project structure, components, state, testing and platform-specific code.
- What it does
- Provides React Native development guidance: a recommended project folder layout, functional component and hook patterns, explicit props interfaces, and state management choices such as local state, Zustand and React Query. It also covers component and hook testing with React Native Testing Library, platform-specific code via Platform.select or separate files, and a list of anti-patterns to avoid.
- When to use it
- Use when writing or reviewing React Native mobile app code, especially when deciding on project structure, component and hook patterns, state management, testing approach or iOS/Android differences.
- Requirements
- No scripts or tooling are shipped; it is instructions only. The guidance assumes a React Native project with TypeScript, and mentions libraries such as Zustand, React Query and React Native Testing Library.