createPostMessageSocketFactory

function
postMessage-client.ts:104

postMessage transport, for attaching without a hub process.

signature
createPostMessageSocketFactory(target?): DevtoolsSocketFactory

Builds a socket factory that carries the protocol over window.postMessage.

Parameters

NameTypeDescription
target?BridgeWindowWindow to post to and listen on. Defaults to the global window.

Returns

DevtoolsSocketFactory, A factory for withDevtools({ socketFactory }).

Example

example
withDevtools(store, { socketFactory: createPostMessageSocketFactory() });