How solve show dialog feature #31
-
How solve show dialog in decompose? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hello. I believe it depends on the complexity of the dialog. Relatively simple dialogs can be just part of the state of a component. E.g. there may be a field in the state, which is observed in the UI and the dialog is displayed. Complex dialogs can be extracted to a separate component. Such a component can be controlled by a dedicated Router, or can be permanent with methods to show/hide the dialog. Depends on the use case. |
Beta Was this translation helpful? Give feedback.
-
Just for reference, because I tried to solve this issue with a dedicated router by using I didn't know that until I tried to find a way to initialize a |
Beta Was this translation helpful? Give feedback.
Hello. I believe it depends on the complexity of the dialog. Relatively simple dialogs can be just part of the state of a component. E.g. there may be a field in the state, which is observed in the UI and the dialog is displayed.
Complex dialogs can be extracted to a separate component. Such a component can be controlled by a dedicated Router, or can be permanent with methods to show/hide the dialog. Depends on the use case.