Simplify on connect (#11176)

This commit is contained in:
Nicolas Mowen
2024-04-30 07:27:39 -06:00
committed by GitHub
parent 461442b399
commit 90bdb07463
2 changed files with 7 additions and 5 deletions

View File

@@ -65,7 +65,13 @@ function useValue(): useValueReturn {
setWsState({ ...wsState, [data.topic]: data.payload });
}
},
onOpen: () => {},
onOpen: () => {
sendJsonMessage({
topic: "onConnect",
message: "",
retain: false,
});
},
shouldReconnect: () => true,
});