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

Top comments (0)

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay