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

Expose the dispatch function #4

Open
alfonsogarciacaro opened this issue May 2, 2019 · 3 comments
Open

Expose the dispatch function #4

alfonsogarciacaro opened this issue May 2, 2019 · 3 comments

Comments

@alfonsogarciacaro
Copy link
Contributor

Because the toast is created as an Elmish command, it'd be useful to expose the dispatch function. For example, Elmish.Toastr allows you to send Elmish messages in the click event. Exposing dispatch would be more flexible if the user has a custom renderer and wants to display several buttons.

@MangelMaxime
Copy link
Contributor

I tried that in the past couldn't find a clean way to support this. Because the dispatch. you have access to in the Cmd is the one from the subcomponent.

@alfonsogarciacaro
Copy link
Contributor Author

That's what I would expect :)

@MangelMaxime
Copy link
Contributor

The previous implementation is still in the code but not documented ^^.

If you want to try it:

I don't remember if this works or no. Or if there is more to add for making the view correct.

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

2 participants