Always make sure that your messages are only rendering once (unless there’s a legitimate reason to update it) github.com/kyle-ssg/react-native-r... pop this into your message component to validate that it stays at 1.
Also check it any other expensive components are rendering as a result on your page. You should aim for a new message to not cause any other components to render. A mixture of keys, purecomponent/shouldcomponentupdate should help here.
Don’t declare functions in the render function if you can avoid it, do this.funcName.
If you’re getting 100s of simultaneous messages updating render state, consider denouncing the render perhaps. So 10 messages in 100ms only calls setstate once.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Always make sure that your messages are only rendering once (unless there’s a legitimate reason to update it) github.com/kyle-ssg/react-native-r... pop this into your message component to validate that it stays at 1.
Also check it any other expensive components are rendering as a result on your page. You should aim for a new message to not cause any other components to render. A mixture of keys, purecomponent/shouldcomponentupdate should help here.
Don’t declare functions in the render function if you can avoid it, do this.funcName.
If you’re getting 100s of simultaneous messages updating render state, consider denouncing the render perhaps. So 10 messages in 100ms only calls setstate once.