not-an-aardvark / snoowrap

A JavaScript wrapper for the reddit API
MIT License
1.02k stars 127 forks source link

How to use snoowrap inside react? #298

Closed tomatualus closed 3 years ago

tomatualus commented 3 years ago

I have a problem, that snoowrap is mutating itself, thus re-rendering the entire react tree, starting from the place it gets initiated as a state. How to handle this?

Venefilyn commented 3 years ago

This is more of a React problem than Snoowrap. Make sure you create Snoowrap outside of React and that you treat the instance as you would with REST API calls