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

Simplify how Dialogs are being created and used in React MVVM context #391

Open
einari opened this issue Nov 12, 2024 · 0 comments
Open

Comments

@einari
Copy link
Contributor

einari commented Nov 12, 2024

Today we have a hook called useDialogRequest(), this returns a wrapper to be used with the actual component that will be the dialog inside it as a child. The reason its been done like this is to be able to provide props to the component. But a lot of the times you basically just have a stand alone dialog and don't need to pass it props. Then it would be nice to be able to do something like below:

export const MyComponent = () => {
     const MyDialog = useDialogRequest(RequestToOpen, MyDialogComponent);

     return (
          <MyDialog/>
     ):
}:
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