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

Access before initialization #95

Open
zertex opened this issue Mar 1, 2024 · 1 comment
Open

Access before initialization #95

zertex opened this issue Mar 1, 2024 · 1 comment

Comments

@zertex
Copy link

zertex commented Mar 1, 2024

Why am I getting this error?

Uncaught ReferenceError: Cannot access 'useApi' before initialization
auth.ts:46

@adam-cowley
Copy link
Owner

It's hard to tell without your seeing code, but you'd normally get that error when you try to use a variable higher up in the code than it is created

useApi() // <-- Uncaught ReferenceError: Cannot access 'useApi' before initialization
const useApi = () => {} // <-- definition below

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

2 participants