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
When using FormattedRelativeTime we notice that we receive a React state warning whenever the component gets unmounted (page change for example).
index.js:1 Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.
at FormattedRelativeTime
Which package?
react-intl: FormattedRelativeTime
Describe the bug
When using FormattedRelativeTime we notice that we receive a React state warning whenever the component gets unmounted (page change for example).
To Reproduce
Codesandbox URL
https://codesandbox.io/s/formattedrelativetime-state-issues-rp0i1?file=/src/index.tsx
Reproducible Steps/Repo
Steps to reproduce the behavior:
Expected behavior
FormattedRelativeTime should properly clear up timeouts in
useEffect
so these errors do not happenDesktop (please complete the following information):
Additional context
Using the latest version of react-intl 5.13.4
The text was updated successfully, but these errors were encountered: