[v5] | [v3] createBottomSheetScrollableComponent's ScrollableComponent needs to return a reference that contains a nativeTag to a Native HostComponent.
Bug
Environment info
| Library | Version |
|---|---|
| @gorhom/bottom-sheet | 5.0.0-alpha.10 |
| react-native | 0.74.2 |
| react-native-reanimated | ^3.12.1 |
| react-native-gesture-handler | ^2.17.0 |
Steps To Reproduce
- I installed and dependencies(rect native navigation,gesture handler, ....
- pod install
- Follow the code one home page
Describe what you expected to happen:
- Sheet open with his content
Reproducible sample code
Same with home page
<BottomSheet ref={bottomSheetRef} onChange={handleSheetChanges} > <BottomSheetView style={{}}> <Text>Awesome π</Text> </BottomSheetView>
any update on this?
Not official comment but I found at patch that can resolve it, but still have snatpoint not working well.
path name: @gorhom+bottom-sheet+5.0.0-alpha.10.patch
diff --git a/node_modules/@gorhom/bottom-sheet/src/utilities/getRefNativeTag.ts b/node_modules/@gorhom/bottom-sheet/src/utilities/getRefNativeTag.ts index d4f3cc4..794a175 100644 --- a/node_modules/@gorhom/bottom-sheet/src/utilities/getRefNativeTag.ts +++ b/node_modules/@gorhom/bottom-sheet/src/utilities/getRefNativeTag.ts @@ -27,17 +27,17 @@ export function getRefNativeTag(ref: unknown) { nativeTag = ref.current._nativeTag; }
- if (!nativeTag || typeof nativeTag !== 'number') {
- throw new Error(
-
`Unexpected nativeTag: ${refType}; nativeTag=${nativeTag}
- // if (!nativeTag || typeof nativeTag !== 'number') {
- // throw new Error(
- // `Unexpected nativeTag: ${refType}; nativeTag=${nativeTag}
-
createBottomSheetScrollableComponent's ScrollableComponent needs to return -
a reference that contains a nativeTag to a Native HostComponent.
- // createBottomSheetScrollableComponent's ScrollableComponent needs to return
- // a reference that contains a nativeTag to a Native HostComponent.
-
ref=${ref} -
` - );
- }
-
// ref=${ref}
-
// `
-
// );
-
// }
return nativeTag; }
You can use this one waiting the official update.
okay thanks
You can use this one waiting the official update.
Thank you
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
I think this has been solved by 4.6.4 version (link), and more specifically by this part:
replace getRefNativeTag with findNodeHandle (https://github.com/gorhom/react-native-bottom-sheet/issues/1823)(by @AndreiCalazans) (b906f5e)
In that version the nativeTag error has been fixed but instead there is some console.warn being printed now π (I reported it here)
could you test on alpha11 ?
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.