@metreeca/tile
    Preparing search index...
    • Adopts a state object as the state of a component.

      Renders the component again after every transition that changes something, never after one returning the same state.

      Type Parameters

      • T extends State<T>

        The state interface

        A model resolved from props is kept in step with them by listing them as dependencies: whenever one of them changes, the model is created again from the factory and the state it reached is discarded, so a list handed a new query starts again from its first page. The new model is the one returned by the render the change shows up in.

      Parameters

      • model: Lazy<T>

        The model, or a factory creating it; resolved when the component first renders, and again whenever one of dependencies changes, so a factory may be written inline and close over props: a prop left out of dependencies reaches the model as it stood when the model was last created

      • Optionaldependencies: readonly unknown[]

        The values the model is created from, compared for deep equality with the ones of the previous render; the model is kept for the lifetime of the component if omitted

      Returns T

      The model as it stands for this render, superseded by the next after every transition that changes something