fawaz-ahmed / react-native-read-more

React native library to show text in a condensed way and expand when needed. Drop in replacement for Text component and highly customizable. Can be used with expo or native cli for react native.
https://www.npmjs.com/package/@fawazahmed/react-native-read-more
MIT License
274 stars 37 forks source link

Logs in Metro causing my application to crash. #49

Closed JRyanSaunders closed 2 years ago

JRyanSaunders commented 2 years ago

This read more component is outputting tonnes of logs into my metro with "padding 238.33... 65.34... 332" every few milliseconds when the content is not expanded. Once opened and I press read more - the logs stop. I believe this is what is causing my application to crash. I once left my screen open for a while with all of these logs and it came up with a warning that said "Please report: excessive number of pendin..." and I couldn't read the warning because it made my application crash. I've attached some images for context.

Screenshot 2021-12-19 at 23 01 08 Screenshot 2021-12-19 at 17 26 01
fawaz-ahmed commented 2 years ago

@JRyanSaunders thanks for reporting. I'll check this out. Is there any stacktrace to this error or is it just repeating logs ? Another question, are you rendering a list of read more component? How many if so ? Is it inside a flatlist ? The higher issue I see here is that the logs appear to be running in a loop. If you can share some piece of code I can replicate this issue.

fawaz-ahmed commented 2 years ago

@JRyanSaunders I checked code and didnt found any console logs. Maybe you are using an old version. Upgrade to v2.2.2

JRyanSaunders commented 2 years ago

@fawaz-ahmed I updated to the latest version and it seems to have fixed it! Thanks mate :)

fawaz-ahmed commented 2 years ago

Super. Glad you're unblocked.