-
-
Notifications
You must be signed in to change notification settings - Fork 913
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Version
v5
Reanimated Version
v3
Gesture Handler Version
v2
Platforms
iOS
What happened?
I want to express my sincere gratitude to the maintainers and contributors of this project.
Context:
There's a crash, when I clicked the reanimated fabric example repo bottomsheet, the app crashed with the error information below.
Reproduction steps
- Run react-native-reanimated project fabric example on iOS device or simulator (both of them crashed)
- Click the bottomsheet on the list
- App crashed
Possible solution:
Per the error information, I update the code as below, and the crash gone away. Should I raise a PR for this?
if (typeof ref.current.unstable_getBoundingClientRect === 'function') {
// @ts-ignore https://github.com/facebook/react/commit/53b1f69ba
const layout = ref.current.unstable_getBoundingClientRect();
handler(layout);
return;
}
// Fallback to the stable API when available
// @ts-ignore once it `unstable_getBoundingClientRect` gets stable 🤞.
if (typeof ref.current.getBoundingClientRect === 'function') {
// @ts-ignore once it `unstable_getBoundingClientRect` gets stable.
const layout = ref.current.getBoundingClientRect();
handler(layout);
}Reproduction sample
https://snack.expo.dev/@farteen/b7f71e
Relevant log output
steffenkleinle, bmitioglov and d-moreiraidlework
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working