Open Volper212 opened 1 month ago
I think the docs just need updating, then. Sounds as though it used to take null
but no longer requires the prop. Would you mind making a PR for this change?
null
actually works as the docs say (it just does not pass the type check with TypeScript's strict mode):
https://github.com/openspacelabs/react-native-zoomable-view/blob/34342f0cd99096d9689305db0e26731ebafdf7e2/src/ReactNativeZoomableView.tsx#L604
So not the docs but the types need to be updated. Alternatively, one could get rid the option of passing null
altogether and just use maxZoom={Infinity}
for infinite zoom. There are two options then.
In the docs it says that
maxZoom
can benull
for infinite scaling. However, the type ofmaxZoom
when one hovers over it isnumber | undefined
, notnumber | null | undefined
.