Wait for localStorage update before dispatching fetch on useEffect

前端 未结 0 570
别跟我提以往
别跟我提以往 2021-02-12 01:26

I have a login page which returns a response , after which im setting a token in localStorage.

  const login = async (e) => {
    e.preventDefault();
    try {         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题