how to prevent onMount call ?
i want to stop calling api on first render even tho i put enabled but still this loading always true
how to fix


10 Replies
quickest-silverOP•3y ago
kindly guide me m stuck
quickest-silverOP•3y ago
here's my queryWrapper

quickest-silverOP•3y ago
n here's the config where m importing func

quickest-silverOP•3y ago
n its almost 10 min still loading continuing
quickest-silverOP•3y ago
but if i put text inside string this issue not happening - only happening in when string empty or its null

quickest-silverOP•3y ago
@Ephem @Louis
robust-apricot•3y ago
please read the docs
https://tanstack.com/query/v4/docs/react/guides/disabling-queries#isinitialloading
Disabling/Pausing Queries | TanStack Query Docs
If you ever want to disable a query from automatically running, you can use the enabled = false option.
When enabled is false:
quickest-silverOP•3y ago
i already checked still same - also no api calls still showing loading

quickest-silverOP•3y ago
GitHub
GitHub - fatimaaCo/dictionary-app
Contribute to fatimaaCo/dictionary-app development by creating an account on GitHub.
robust-apricot•3y ago
what's there to look at? That's a million files. Please provide a standalone, running reproduction (codesandbox or stackblitz)