Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functions in from useVoice are no longer stable between re-renders in @humeai/voice-react 0.1.15 #269

Open
michalmo opened this issue Sep 25, 2024 · 0 comments

Comments

@michalmo
Copy link

Something in version 0.1.15 (probably #265) has changed the behaviour of the functions returned by the useVoice hook. The references returned are now changing with each render (so as often as fft changes).

Specifically in my code effects such as this are being called each render:

  const { readyState, sendUserInput } = useVoice();

  useEffect(() => {
    if (readyState === VoiceReadyState.OPEN) {
      sendUserInput(...);
    }
  }, [readyState, sendUserInput]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant