Closed jibraniqbal666 closed 5 years ago
hi @jibraniqbal666 Could you check with fresh install of RN 0.59.9 is this behavior exists?
I just checked a fresh install on 0.59.10, seems EStyleSheet.create is not creating the style objects within it correctly? Cannot read property 'width' of undefined.
@Rodrigo77777 thanks for checking out, I was busy, that is why I was not able to send reproducible procedure on the bug. it is definitely a bug, we use Dimension.get('screen') to get the width for now.
@jibraniqbal666 Seems like it might be an issue with percentage values on the width right? EDIT: Changed from width value to Dimensions value, same issue. Object which contains width is undefined for some reason
@vitalets temporarily replaced EStyleSheet for react native's Stylesheet, and the app ran correctly. Not sure if the information helps, but thought it might
Just tested with fresh install of RN 0.59.10 and default generated app - everything works for me
Changed StyleSheet
-> EStyleSheet
in App.js
:
import EStyleSheet from 'react-native-extended-stylesheet';
...
EStyleSheet.build();
const styles = EStyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
...
Env:
react-native --version
react-native-cli: 2.0.1
react-native: 0.59.10
Could you provide more details?
Hey @vitalets turns out my specific issue was bubbling up from a new issue with babel completely unrelated to EStyleSheet. I'll leave it to @jibraniqbal666 to provide further details on the issue he is experiencing.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Steps to Reproduce
Try in Expo
Expected Behavior
Does not build layout on first load.
Actual Behavior
should build layout on first load.
Show the code
Environment