Closed gilberger closed 5 years ago
Hey thanks for the contribution and figuring out the issue.
If you reference previous state we need to use an updater function with setState
Can you switch it over to be the below code and I'll merge it.
this.setState(state => {
if (state.measured) {
return null;
}
return {
measured: true,
height: e.nativeEvent.layout.height,
};
});
Sure. committed again with the changes.
Thanks for sharing this code!
Hey!
Been experiencing the same issue as described in https://github.com/browniefed/react-native-ticker/issues/10
this change should solve this issue.
Cheers.