react-native-bottom-sheet icon indicating copy to clipboard operation
react-native-bottom-sheet copied to clipboard

[v5] | [v3] createBottomSheetScrollableComponent's ScrollableComponent needs to return a reference that contains a nativeTag to a Native HostComponent.

Open wogno opened this issue 1 year ago β€’ 8 comments

Bug

Capture d’écran 2024-06-28 aΜ€ 21 29 07

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

  1. I installed and dependencies(rect native navigation,gesture handler, ....
  2. pod install
  3. Follow the code one home page

Describe what you expected to happen:

  1. Sheet open with his content

Reproducible sample code

Same with home page

<BottomSheet ref={bottomSheetRef} onChange={handleSheetChanges} > <BottomSheetView style={{}}> <Text>Awesome πŸŽ‰</Text> </BottomSheetView>

wogno avatar Jun 28 '24 23:06 wogno

any update on this?

arbaaz-suggaa avatar Jul 10 '24 10:07 arbaaz-suggaa

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; }

wogno avatar Jul 10 '24 12:07 wogno

You can use this one waiting the official update.

wogno avatar Jul 10 '24 12:07 wogno

okay thanks

arbaaz-suggaa avatar Jul 10 '24 12:07 arbaaz-suggaa

You can use this one waiting the official update.

Thank you

Feridinha avatar Jul 16 '24 08:07 Feridinha

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.

github-actions[bot] avatar Aug 15 '24 09:08 github-actions[bot]

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)

piotr-sobczyk avatar Aug 16 '24 12:08 piotr-sobczyk

could you test on alpha11 ?

gorhom avatar Aug 31 '24 16:08 gorhom

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.

github-actions[bot] avatar Oct 01 '24 09:10 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Oct 07 '24 09:10 github-actions[bot]