Back to articles
Things I Wish I Knew Before Building My First React Native App

Things I Wish I Knew Before Building My First React Native App

via Dev.toAbdulmalik Muhammad

I remember the first time I opened a React Native project. I thought, I already know React, how different can this be? Pretty different, it turns out. Here's what I wish someone had told me before I wasted time figuring it out myself. The bridge is not free Early on I treated React Native like a browser. I passed big objects around, called native modules constantly, didn't think twice about it. Then I started noticing janky animations and sluggish interactions. The JavaScript thread and the native thread are separate. Every time they talk to each other there's a cost. The more you understand that, the better decisions you make about where logic lives and how often you cross that bridge. StyleSheet.create is not just for organization I was using inline styles everywhere when I started because it felt easier. Turns out StyleSheet.create isn't just a pattern for keeping things tidy. It validates styles at compile time and optimizes them so they don't get recreated on every render. Small t

Continue reading on Dev.to

Opens in a new tab

Read Full Article
0 views

Related Articles