Reusable modal in ReactJs
|Added at||2017-01-01 11:01|
I'm trying to create a service which will show a Confirm Dialog and catch user's action (Confirm/Cancel) and can be reusable in any Component with less attempt.
What I tried so far (using
I create a service like:
Then in my component, I inject this to
And whenever I need to show Confirm modal, I'll call
What I do to close that Confirm dialog, as you can see, is set
So how can I implement a service where I have full control to the Dialog?