Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wogno opened this issue Jun 28, 2024 · 10 comments
Labels
bug Something isn't working invalid This doesn't seem right no-issue-activity

Comments

@wogno
Copy link

wogno commented Jun 28, 2024

Bug

Capture d’écran 2024-06-28 à 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



Awesome 🎉

@wogno wogno added the bug Something isn't working label Jun 28, 2024
@arbaaz-suggaa
Copy link

any update on this?

@wogno
Copy link
Author

wogno commented Jul 10, 2024

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
Copy link
Author

wogno commented Jul 10, 2024

@wogno
Copy link
Author

wogno commented Jul 10, 2024

You can use this one waiting the official update.

@arbaaz-suggaa
Copy link

okay thanks

@Feridinha
Copy link

You can use this one waiting the official update.

Thank you

Copy link

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.

@piotr-sobczyk
Copy link

piotr-sobczyk commented Aug 16, 2024

I think this has been solved by 4.6.4 version (link), and more specifically by this part:

replace getRefNativeTag with findNodeHandle (#1823 @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)

@gorhom
Copy link
Owner

gorhom commented Aug 31, 2024

could you test on alpha11 ?

@gorhom gorhom added the invalid This doesn't seem right label Aug 31, 2024
Copy link

github-actions bot commented Oct 1, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right no-issue-activity
Projects
None yet
Development

No branches or pull requests

5 participants