miso
Copyright(C) 2016-2025 David M. Johnson (@dmjio)
LicenseBSD3-style (see the file LICENSE)
MaintainerDavid M. Johnson <code@dmj.io>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Miso.Runtime.Internal

Description

This is an internal module not meant for consumption during application development. This is primarily meant to give user's access to the global component state for testing. Use at your own risk. You have been warned.

We currently consume this module for the miso integration testing package miso-tests.

Alterations to these global variables *will* break your application. Again, do not use these in your main application, only use with the miso testing framework to test your application.

Synopsis

Documentation

components :: IORef (IntMap (ComponentState model action)) Source #

componentMap

This is a global Component Map that holds the state of all currently mounted Components

componentIds :: IORef Int Source #

The global store of ComponentId, for internal-use only.

Used internally freshComponentId to allocate new ComponentId on mount.

rootComponentId :: ComponentId Source #

This is used to demarcate the ROOT of a page. This ID will *never* exist in the components map.

data ComponentState model action Source #

Component state, data associated with the lifetime of a Component

Constructors

ComponentState 

Fields