The Ready Function
With virtual DOM libraries such as React, Inferno, Snabbdom, Mithril, and others, it is often easy to attach handlers from the view function. However, when returning plain HTML strings, for example from string concatenation, jQuery, or templating engines, it is convenient to attach handlers when the initial document is ready. For this and other code you need to run only once after rendering the initial view, use the Meiosis ready
function.
Examples
The VanillaJs TodoMVC and jQuery TodoMVC examples use a ready
function to attach event handlers. All of the examples also use ready
to listen to location changes using the history library.