createLoopbackHub
functionsignature
createLoopbackHub(): LoopbackHubCreates a self-contained in-memory DevTools hub plus the two client transports
that connect to it, a socketFactory for the store agent and a
WebSocket-compatible class for the panel UI. No ports, no server, no
extension: everything runs in the current process.
Returns
Example
example
const hub = createLoopbackHub();
withDevtools(store, { port: 0, socketFactory: hub.agentSocketFactory });
// <DevtoolsApp config={{ port: 0, WebSocket: hub.WebSocket }} />