oninit vs oncreate for State Initialization in Mithril 2.x
When initializing a component's state in Mithril 2.x, developers must choose between the oninit and oncreate lifecycle hooks. The choice depends on whether the initialization logic requires access to the rendered DOM or must be completed before the first render cycle occurs. Using oninit allows for state setup before the virtual DOM is rendered, preventing p