Promise for React Available?
karanmartian opened this issue · comments
Karan Kamdar commented
Hey so this component causes a setState warning if the component is unmounted. Is there some kind of promise/callback available by which I can know when the data is received and loaded into the card?
Kiko Beats commented
Hello,
This should be easy to address at the moment the data is fetched:
https://github.com/microlinkhq/sdk/blob/master/packages/react-microlink/src/index.js#L35
Something like this could be enough:
this.setState(data, callback)
Can you clarify why this is necessary? Where are you seeing the warning?