I ran this from the command line to add a library to my Expo app:
yarn add react-native-text-size
react-native link react-native-text-size
Then rebuilt my app. However, when I import and use in a component with:
import rnTextSize from 'react-native-text-size';
...
componentDidMount() {
const size = rnTextSize.measure({
text: 'Measure me baby'
});
}
It throws this error:
TypeError: TypeError: undefined is not an object (evaluating '_reactNativeTextSize.default.measure')
Is there an Expo-related reason why a third-party npm library can’t be used? Or am I missing something about getting a third party library to show up in NativeModules
?