React Native practices
Ship mobile features faster with structure that stays readable as the app grows.
Structure, tooling, performance and responsive UI
What you'll take away
Organise code by feature so changes stay local
Cut re-renders with focused components and memoisation
Keep styling, constants and responsive sizing consistent
27 entries · click a command to copy
Project structure
Group related files by feature so a screen is easy to find and maintain.
Create a self-contained feature folder for screens, components, hooks and styles.
Re-export components from an index.js barrel file for cleaner imports.
e.g. import { Header } from '@features/Landing'
Keep presentational components separate from stateful container logic.
Put reusable stateful logic in custom hooks such as useHorizontalFeeds.js.
Tip: Name custom hooks with the use prefix so React can enforce hook rules.
Ship loading skeletons alongside the screens they represent.
Tooling and code style
Add linting and formatting to the project.
Lint the whole project and auto-fix what can be fixed.
Tip: Run this in CI so style issues never reach review.
Format all supported files consistently.
Add runtime validation for component props.
Declare expected props so mistakes fail early and code is self-documenting.
Use camelCase for variables, PascalCase for components and ALL_CAPS for constants.
Component design
Keep components focused; split files once they grow beyond roughly 500 lines.
Follow DRY: common helpers, components and hooks belong outside a single feature.
Add Redux Toolkit to avoid passing state through many layers of props.
Tip: Prefer Redux for state shared across screens; keep purely local state local.
Keep state as local as possible, then lift it when multiple components need it.
Performance and cleanup
Define styles once outside the component instead of using inline style objects.
Tip: Inline objects create new references on every render and can trigger re-renders.
Skip re-rendering a component when its props have not changed.
Keep a function reference stable between renders.
Cache an expensive derived value until its inputs change.
Clean up timers, intervals and event listeners in the effect's return function to avoid leaks.
Constants
Create one home for fixed values used across the app.
Keep every colour in one place instead of repeating hex values.
Group font names, image assets and user-facing strings as separate constants.
Responsive UI
Add device-aware sizing helpers.
Size values from viewport percentages instead of fixed pixels.
Convert a design-pixel font size into a responsive value using the project's 1.4% baseline.
Use the helper for spacing and dimensions so no raw numbers appear in style rules.
Tip: Define any unavoidable magic numbers in the constants file.
This sheet was curated from reference material in the Skyware AI technical library (Common Practices for React Native (internal engineering document)). Command syntax is factual; explanations, grouping and examples were written by our engineering team. Always verify syntax against your tool or database version.
More cheat sheets
Git commands
A practical Git reference grouped by task: setup, inspecting changes, commits, branches, remotes and undoing mistakes.
OpenSQL data cleaning
A task-oriented SQL reference for string cleanup, NULL handling, type conversion, dates, aggregation and deduplication.
OpenPandas essentials
The core Pandas operations you reach for daily, organised by task with short, copyable examples.
Open