Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak #160

Closed
appigram opened this issue May 17, 2021 · 1 comment · Fixed by #163
Closed

Memory leak #160

appigram opened this issue May 17, 2021 · 1 comment · Fixed by #163

Comments

@appigram
Copy link

Live updates causing memory leak. Look at Listeners increasing to infinity and JS Heap graph
image

We set live={false} and no any issues
image

Out wrapper component to render dates

import TimeAgo from 'react-timeago'
import russianStrings from 'react-timeago/lib/language-strings/ru'
import englishStrings from 'react-timeago/lib/language-strings/en'
import buildFormatter from 'react-timeago/lib/formatters/buildFormatter'

const formatter = currLang === 'en' ? buildFormatter(englishStrings) : buildFormatter(russianStrings)
return <TimeAgo date={date} formatter={formatter} itemProp='datePublished' live={false} />

react-timeago version: 6.1.1

Anyway, thanks for that awesome package!

@nmn
Copy link
Owner

nmn commented May 29, 2021

Should be fixed.

@nmn nmn closed this as completed May 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants