I have the following code which uses a third party hook:
const [libraryOptions, setLibraryOptions] = useState<Partial<LibraryOptions>>({
flag: true
})
const vad = useLibrary(libraryOptions);
When I setLibraryOptions({...libraryOptions, flag:false})
the hook does not update. I want to change these settings for research purposes however the hook does not expose a way to update these settings.
Is there a way to reinitialise the hook with these new options?