• Creates a context object that may be used to store and retrieve arbitrary values.

    If a defaultValue is provided, it will be returned from context.get() when no value has been set for the context. Otherwise reading this context when no value has been set will throw an error.

    Type Parameters

    • T

    Parameters

    • OptionaldefaultValue: T

      The default value for the context

    Returns unstable_RouterContext<T>

    A context object