You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Authentication context
I have both of them dependent on each other. Eg: signout is in auth. But create user is dependent on authentication as it has to set user as authenticated after getting the user. And authentication context would have to set user on the user context after login. But the application throws an error as the order in which the application is wrapped can be either be in one way like
<AuthContainer.Provider>
<UserContainer.Provider>
or
<UserContainer.Provider>
AuthContainer.Provider>
And this would throw an error like this
I would like to know if there is any way to solve this.
The text was updated successfully, but these errors were encountered:
varghesethomase
changed the title
[Question] Understand how the chain dependency issue with Contexts
[Question] Understand how to solve the circular dependency issue with Contexts
Nov 25, 2019
I have two Contexts.
I have both of them dependent on each other. Eg: signout is in auth. But create user is dependent on authentication as it has to set user as authenticated after getting the user. And authentication context would have to set user on the user context after login. But the application throws an error as the order in which the application is wrapped can be either be in one way like
or
And this would throw an error like this
I would like to know if there is any way to solve this.
The text was updated successfully, but these errors were encountered: