Setu-TS
    Preparing search index...

    Interface RouterContextKey<T>

    A React Router context key, used by identity as the argument to RouterLoadContext.get / RouterLoadContext.set.

    Structurally identical to React Router's RouterContext<T>, so a key created by this package and a key created by createContext<T>() from react-router are interchangeable. defaultValue is returned by get() when no value has been set; a key without one makes get() throw for an unset key.

    0.2.0

    interface RouterContextKey<T> {
        defaultValue?: T;
    }

    Type Parameters

    • T
    Index
    defaultValue?: T

    Value returned by get() when the key has not been set.