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

[v3] - Expo Link with asChild breaks Unistyles C++ state #432

Open
jpudysz opened this issue Dec 14, 2024 · 0 comments
Open

[v3] - Expo Link with asChild breaks Unistyles C++ state #432

jpudysz opened this issue Dec 14, 2024 · 0 comments
Labels
enhancement New feature or request reproduced
Milestone

Comments

@jpudysz
Copy link
Owner

jpudysz commented Dec 14, 2024

Description

The issue was reported on Discord.
When attempting to use the Link component from Expo Router with the asChild flag, it breaks the C++ style and throws the Unistyles not bound! error.

image

Using an array helps prevent the error, but it doesn't apply the styles. This happens because Unistyle is -- once again, broken.

To resolve this, we need to implement a fallback mechanism for the Style is not bound! error, allowing us to manually look for the ShadowNode.

Steps to Reproduce

  1. Bootstrap Expo Router app
  2. Add Link with asChild prop
  3. Move styles to Pressable

Observe Unistyle is not bound! error.

Snack or Repository Link (Optional)

No response

Unistyles Version

3.0.0-beta.2

React Native Version

0.76.0

Platforms

iOS

Expo

Yes

@jpudysz jpudysz changed the title [v3] - Expo Link with asChild is breaking Unistyles C++ state [v3] - Expo Link with asChild breaks Unistyles C++ state Dec 14, 2024
@jpudysz jpudysz added enhancement New feature or request reproduced labels Dec 14, 2024
@jpudysz jpudysz added this to the 3.0.0-beta.3 milestone Dec 14, 2024
@jpudysz jpudysz modified the milestones: 3.0.0-beta.3, 3.0.0-beta.5 Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request reproduced
Projects
None yet
Development

No branches or pull requests

1 participant