Skip to content Skip to sidebar Skip to footer

How Can I Measure Text In React Native Using The Expo Framework

I'm currently trying to make my React Native application based on Expo without dropping down to native dependencies. I'm wondering if there is a way to measure text (down to the pi

Solution 1:

You need to attach the onLayout event to your view. Once RN calculates that, you get the dimensions back.

https://facebook.github.io/react-native/docs/view.html#onlayout


Post a Comment for "How Can I Measure Text In React Native Using The Expo Framework"