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

[Advanced] Restrict useage of child component only as a child of a particular component #718

Open
jonathandsouza opened this issue Jun 26, 2024 · 0 comments
Labels
ADVANCED Advanced Cheatsheet

Comments

@jonathandsouza
Copy link

What cheatsheet is this about? (if applicable)

I want to write a cheatsheet exaplaining a pattern where we can restrict a component only to be used as a descendant of another compnent.

Advanced cheatsheet

What's your issue or idea?
There is a common pattern used in libraries such as RadixUI where we can use Context to restrict useage of a child only as a descendant of another component.

I want to write up a cheatsheet for a minimal implementation of this pattern.

Write here

@jonathandsouza jonathandsouza added the ADVANCED Advanced Cheatsheet label Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ADVANCED Advanced Cheatsheet
Projects
None yet
Development

No branches or pull requests

1 participant