jeudi 27 mai 2021

Correct way to use "useCallback" in React?

Do I need add webstate as second parameter here or not?

let handleSubmit = useCallback(() => {
    webcamState === 'on'
      ? roomClient.disableWebcam()
      : roomClient.updateWebcam({ start: true });
  }, []);



Aucun commentaire:

Enregistrer un commentaire