react-plaid-link icon indicating copy to clipboard operation
react-plaid-link copied to clipboard

fix: recreate instance immediately

Open KATT opened this issue 5 months ago • 0 comments

What

  • Recreates the Plaid instance immediately in a useMemo() rather than a useEffect()
  • Trashes the old Plaid instance when unmounting

Why

I have code that takes care of invalidating expired tokens and recreates the Plaid instance when/if needed & since the Plaid token isn't resolved immediately I can't trust the connect.open() to be immediately pointing to the new token rather than the old one

KATT avatar Aug 26 '24 11:08 KATT