import React from "react"; interface Props { websocketRef: React.MutableRefObject; } const serverControl = ({ websocketRef }: Props) => { const setStateFunction = (state: string) => { websocketRef.current?.send(`{"event":"set state","args":["${state}"]}`); }; return ( <> ); }; export default serverControl;