|
|
|
|
|
by AlexErrant
17 days ago
|
|
I assume you mean `useEffect`. That does not work because `loadTTS` is actually a hook, so its `useLoadTTS`, and hooks must be top level. I encourage you to look at the pastebin in my link, repeated here https://pastebin.com/sjc3vXTd So, I must have let provider = useGetUserPreference()
let a = useLoadTTS_A()
let b = useLoadTTS_B()
let c = useLoadTTS_C()
useEffect(() => {
if (provider=="a") a()
if (provider=="b") b()
if (provider=="c") c()
})
Oh hey, what's that? I have to allocate memory for b and c even though only a is used? THANKS REACT. |
|