5 tips to write better react native code 💻

Avoid passing functions as inline props

✅ Do this
❌ Don’t do this

Use FlatList over .map

✅ Do this
❌ Don’t do this

Avoid passing objects as inline props

✅ Do this
❌ Don’t do this

Use Tailwind over style sheets

✅ Do this
❌ Don’t do this

Avoid rendering conditionally

❌ Don’t do this
✅ Do this

Closing thoughts

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Gbae

Gbae

dev with a caffeine addiction 📱