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

How to fix You are either trying to access a global state which was not created or it was deleted. #5

Open
marxyes opened this issue Jun 8, 2022 · 0 comments

Comments

@marxyes
Copy link

marxyes commented Jun 8, 2022

If I want to check whether the state is present or not before trying to access it is there any way?
As I am training to set the global state on use effect and call API the result will store in the global state and same store will be accessed in the same component if there is data in the state we won't call API again and again.
So want to check if the store is available? if not then call API and create a store after that use that store everywhere.

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