DEV Community

Matt Ruiz
Matt Ruiz

Posted on

React and React Native coding conventions for a successful cross-platform team in 2025

Hola hola,

I’ve been building cross-platform apps since 2019. What started as just React Native has expanded into the React/NextJS realm.

React and React Native make for a great team — especially in the modern AI-coder era.

Underneath-the-hood, I’m sure there are million things that are different between React and React Native. But, from a developer POV, or more specifically from a codebase lead POV, there are many similarities between the two “frameworks”.

Here are some priorities that our team focuses on when delivering React and React Native components:

  1. Code structure consistency across React and React Native is number one priority
  2. The more files the better — just name them consistently
  3. Remove unnecessary View and div components
  4. Minimize prop drilling
    • We have a purposefully large redux setup
  5. Inline onclick logic should be extracted into a function if more than one line
  6. More useMemo and useCallback 7.Static consts declared locally outside of the component
  7. Do not use an array index as a key value on list items.
  8. Import names should always match the export name

There are many others that we chat about but don’t have in Notion.

What conventions do you hold yourself or your team accountable for?

— Matt

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

Sentry mobile image

App store rankings love fast apps - mobile vitals can help you get there

Slow startup times, UI hangs, and frozen frames frustrate users—but they’re also fixable. Mobile Vitals help you measure and understand these performance issues so you can optimize your app’s speed and responsiveness. Learn how to use them to reduce friction and improve user experience.

Read full post →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay