You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please consider introducing the Dialog.Consume component, which can receive Function as Child Component and pass functions like setOpen to the sub-components.
This can make the code more concise and reduce the burden of state management.
I don't think it would be worth adopting this feature, since the Radix Primitive concept is meant to be more generic. But you can create this yourself in your applications if you really feel the need.
I don't understand how this affects its generality. Its idea is the same as Dialog.Trigger and Dialog.Close , which is to avoid declaring state, but it is more flexible and powerful than Dialog.Trigger and Dialog.Close.
Feature request
Overview
Please consider introducing the Dialog.Consume component, which can receive
Function as Child Component
and pass functions likesetOpen
to the sub-components.This can make the code more concise and reduce the burden of state management.
Example:
or
The text was updated successfully, but these errors were encountered: