Skip to content
Cheat sheets/React Native practices

React Native practices

Ship mobile features faster with structure that stays readable as the app grows.

Structure, tooling, performance and responsive UI

10 MIN27 ENTRIES6 GROUPSUPDATED 2026-11-18

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

01

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.

02

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.

03

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.

04

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.

05

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.

06

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.

§ CREDITSource and curation

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.