How can I do that when the home view navigates to the login view, trigger the useEffect of the login?

前端 未结 2 811
一整个雨季
一整个雨季 2021-01-22 17:04

Basically in login I have a function that verifies if a token exists, and if it exists automatically redirects to thehome view, otherwise it will remai

2条回答
  •  一整个雨季
    2021-01-22 17:35

    clearStorage() call the method, When If loaded. remove the () from clearStorgae.

提交回复
热议问题