react-aad icon indicating copy to clipboard operation
react-aad copied to clipboard

My UI re-render always when calling getAccessToken()

Open anupong-s opened this issue 5 years ago • 0 comments

I fetch the data on 'componentDidMount' and before fetch the data, I calling getAccessToken(). I found my page re-render loop. And then, I creating the button for call getAccessToken(). I found my ui re-render always click the button.

I compare the prev-state and next-state, I found "state" changed. I think, If accessToken not expired, Should It be return from cache?.

image

Anyone help me please.

msal: 1.2.0 react-aad-msal: 2.3.2

anupong-s avatar Sep 05 '20 12:09 anupong-s