You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I add some log in the source code of withIAPContext, and find that the state 'currentPurchase' of WrapperComponent changed hundreds times, because the entire App is wrapped by it, so the entire DOM tree of app keep re-rendering hundreds times. This issue make the app very very slow on every app restart
It's a bit odd,I remember being able to reduce the number of re-renders by handling the currentPurchase returned from useIAP in my App component. However, now, why does WrapperComponent cause the entire DOM tree to re-render? What should I do now?should I change the code of WrapperComponent which returned by withIAPContext to reduce the number of re-renders ?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I add some log in the source code of withIAPContext, and find that the state 'currentPurchase' of WrapperComponent changed hundreds times, because the entire App is wrapped by it, so the entire DOM tree of app keep re-rendering hundreds times. This issue make the app very very slow on every app restart
Is this issue also related to update-listener-called-many-times-on-ios-storekit-1?
It's a bit odd,I remember being able to reduce the number of re-renders by handling the currentPurchase returned from useIAP in my App component. However, now, why does WrapperComponent cause the entire DOM tree to re-render? What should I do now?should I change the code of WrapperComponent which returned by withIAPContext to reduce the number of re-renders ?
Beta Was this translation helpful? Give feedback.
All reactions