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:
- Code structure consistency across React and React Native is number one priority
- The more files the better — just name them consistently
- Remove unnecessary
View
anddiv
components - Minimize prop drilling
- We have a purposefully large
redux
setup
- We have a purposefully large
- Inline onclick logic should be extracted into a function if more than one line
- More
useMemo
anduseCallback
7.Static consts declared locally outside of the component - Do not use an array index as a
key
value on list items. - 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)