MCPcopy
hub / github.com/reduxjs/redux-devtools / connect

Function connect

packages/redux-devtools-app/src/middlewares/api.ts:191–203  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

189}
190
191function connect() {
192 if (process.env.NODE_ENV === 'test') return;
193 const connection = store.getState().connection;
194 try {
195 socket = socketCluster.create(connection.options);
196 handleConnection();
197 } catch (error) {
198 store.dispatch({ type: actions.CONNECT_ERROR, error: error as Error });
199 store.dispatch(
200 showNotification((error as Error).message || (error as string))
201 );
202 }
203}
204
205function disconnect() {
206 if (socket) {

Callers 15

apiFunction · 0.70
Header.tsxFile · 0.50
RecordButton.tsxFile · 0.50
SyncButton.tsxFile · 0.50
PersistButton.tsxFile · 0.50
LockButton.tsxFile · 0.50
SliderButton.tsxFile · 0.50
ExportButton.tsxFile · 0.50
ImportButton.tsxFile · 0.50

Calls 2

showNotificationFunction · 0.90
handleConnectionFunction · 0.85

Tested by

no test coverage detected