My tips for working with Elmish

Before using it in your application or library, you need to weight the pros and cons compare to not using the standard features set.For example, you should favor using Cmd.ofSub instead of creating a custom command if Cmd.ofSub works.Also, this is not intended to be a guide/tutorial on how to implements it, I just want to mention that this is possible.Program compositionBy using program composition, you can add a new behavior to any Elmish application for example you can make it support navigation via URL, render using React, attach a debugger, etc.This is exactly what you do when wiring your Elmish application:Custom commandsThis is also possible to create your own commands. For example, Elmish.Browser is offering you severalNavigation commands:Refine your user experienceYou can combine use everything we speak about earlier in order to provide a nice user experience.For example, Thoth.Elmish.Toast is a library adding global notification supports to any Elmish application uses:Program composition to register the library logic and viewsCustom commands in order to send a notification to the program directlyF# feature to provide a Toast builder interface using pipesConclusionElmish is a really powerful library and make good use of the standard F# features like function composition, partial application, guide you to write safe code (handling success and error case).It’s also offer you powerful customization if the standard features are not enough.I hope you found this article useful and that it will help you..If you want another article to describe a specific subject please comments below ????.. More details

Leave a Reply