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

feat: stateless variants #462

Merged
merged 29 commits into from
Jan 15, 2025
Merged

feat: stateless variants #462

merged 29 commits into from
Jan 15, 2025

Conversation

jpudysz
Copy link
Owner

@jpudysz jpudysz commented Dec 20, 2024

Summary

This is another attempt to simplify styles and useVariants implementation. This should address multiple issues like:

Also this should work now:

console.log(styles) // styles without variants

styles.useVariants({...})

console.log(styles) // styles with variants

And other issues with variants reported by the community.

Edit, this PR also addresses:

Most likely it will also unblock: #368

Todo:

  • - POC
  • - Remove HostObject, use plain JS object
  • - Pass variants to ShadowRegistry
  • - Support withUnistyles
  • - Align web
  • - Tests

Copy link

vercel bot commented Dec 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-unistyles-2.0 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 15, 2025 11:20am
react-native-unistyles-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 15, 2025 11:20am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants