Closed ollie232 closed 1 year ago
Hey @ollie232, thanks for raising this. Will take a look at this and fix it!
Hello I manged to find a fix. However this maybe environment specific.
You can change line 39 and line 40 within node_modules/react-native-timer-picker/dist/components/Modal/index.js to the code below.
var updatedScreenWidth = dimensionsUpdate.windowPhysicalPixels.width; var updateadScreenHeight = dimensionsUpdate.windowPhysicalPixels.height;
That should be sorted now 🙌
I realised that that whole pattern of listening to a dimensions change and updating state was really outdated. There's now a neat useWindowDimensions() hook that receives updates to the dimensions.
When changing from portrait to landscape and vice versa " Cannot read property 'width' of undefined" error occurs.
This error stems from line 17 within \dist\components\modal\index.js