react-native-reusables icon indicating copy to clipboard operation
react-native-reusables copied to clipboard

[ BUG ] Portal-dependent components do not open properly

Open Shair17 opened this issue 3 months ago • 7 comments

Reproduction link: https://github.com/Shair17/rn-reusables-select-issue

Describe the bug I'm using react native cli, I installed everything in a fresh project, according to the documentation, however the components that depend on portal or that have animations don't work, for example Select

Steps to reproduce the behavior:

  1. Start the '...' app with '...'
  2. Go to '...'
  3. Click on '....'
  4. Scroll down to '....'
  5. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots Image

Platform (please complete the following information):

  • Type: Simulator
  • OS: Android (maybe iOS also)

CLI output (paste the full command output)

If applicable, paste the full command output by running it with the --log-level all flag.

npx @react-native-reusables/cli@latest --log-level all [command] [args] [options]

// example:
// npx @react-native-reusables/cli@latest --log-level all init -t minimal

Additional context Add any other context about the problem here.

Shair17 avatar Sep 24 '25 20:09 Shair17

Facing the same issue currently

itishermann avatar Sep 26 '25 20:09 itishermann

Also not working for me.

npx @react-native-reusables/cli@latest doctor shows everything is configured correctly. Other components like Button work fine.

But PortalHost components, like Tooltip, Popover, etc do not work AT ALL.

Using Expo SDK 54 with Expo Router.

Nothing in here worked https://github.com/founded-labs/react-native-reusables/issues/458 That issue was closed prematurely.

TylerSandman avatar Sep 26 '25 22:09 TylerSandman

Update: I've applied these patches #450 And upgraded nativewind to ^4.2.1 and react-native-reanimated to ~4.1.2

These solved the issue for me Expo SDK 54 and Expo Router too

itishermann avatar Sep 26 '25 23:09 itishermann

I tried applying the patches and using those versions of nativewind & react-native-reanimated. Unfortunately, still experiencing the same issue

TylerSandman avatar Sep 27 '25 02:09 TylerSandman

Update: I've applied these patches #450 And upgraded nativewind to ^4.2.1 and react-native-reanimated to ~4.1.2

These solved the issue for me Expo SDK 54 and Expo Router too

I applied all, now it opens when I tap or press the selector, however it closes immediately, I have to hold the tab and slide my cursor or finger towards the contents of the selector to keep selector opened

https://github.com/user-attachments/assets/d0c7baf9-3edf-4e0d-96d6-81ece959e7b9

Shair17 avatar Sep 27 '25 17:09 Shair17

I started a new project with the Clerk Auth template and for the most part everything works, except displaying the user-menu within the PortalHost. I've upgraded dependencies so that it will run on SDK 54 and generally everything works, it builds correctly, I can log in (but obviously I can't log out because the user-menu doesn't show up.). I also put a console log verifying that onPress is registering, the popover just never shows up.

Dave-Wagner avatar Oct 03 '25 15:10 Dave-Wagner

I'm still learning, and this one really puzzled me so I turned to various different AI's to try to figure out the problem. Claude Sonnet 4.5 came up with a solution but honestly I'm still so new I'm struggling to figure out why this works but it does, the popup now shows up. I'm hoping someone with more knowledge and skills can make sense of this and explain it better than I can. Here is the working user-menu.tsx compared to an unmodified version of user-menu.tsx.

https://www.diffchecker.com/9inGgiR4/

Dave-Wagner avatar Oct 12 '25 17:10 Dave-Wagner