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

[question] What is the difference between withRootProvider and withProvider? #488

Open
FranciscoKloganB opened this issue Dec 12, 2024 · 0 comments

Comments

@FranciscoKloganB
Copy link

FranciscoKloganB commented Dec 12, 2024

What is the difference between withRootProvider and withProvider return by createStyledContext?

  • When should each be used?

Is the summary accurate?

  • The withRootProvider wraps a component with a context provider that supplies style information derived from the recipe to the nodes descending from the root. The withRootProvider does not apply any styling to the component.
  • The withProvider creates a styled component that also forwards a ref. In the process it creates a styled component while also providing context to descending nodes.
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

No branches or pull requests

1 participant