Interface SSRExecutorManagerOptions

Options provided to the SSRExecutorManager constructor.

interface SSRExecutorManagerOptions {
    devtools?: boolean;
    executorFilter?: ((executor) => boolean);
    keySerializer?: ((key) => any);
    nonce?: string;
    plugins?: (undefined | null | ExecutorPlugin)[];
    stateStringifier?: ((state) => string);
}

Hierarchy (view full)

Properties

devtools?: boolean

If true then executors are registered in the devtools extension.

Default

true
executorFilter?: ((executor) => boolean)

Filters executors that must be hydrated on the client with the state that was accumulated during SSR.

By default, only executors that were fulfilled during SSR are hydrated on the client.

Type declaration

    • (executor): boolean
    • Parameters

      • executor: Executor<any>

        The executor to check.

      Returns boolean

Returns

true if the executor must be hydrated on the client, or false otherwise.

keySerializer?: ((key) => any)

Serializes executor keys.

The serialized key form can be anything. If you want to use object identities as executor keys, provide an identity function as a serializer.

Type declaration

    • (key): any
    • Parameters

      • key: any

        The key to serialize.

      Returns any

Default

JSON.stringify
nonce?: string

A nonce string to allow scripts for script-src Content-Security-Policy.

plugins?: (undefined | null | ExecutorPlugin)[]

Plugins that are applied to all executors.

stateStringifier?: ((state) => string)

Stringifies an executor state before it is sent to the client.

Type declaration

    • (state): string
    • Parameters

      Returns string

Default

JSON.stringify