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 updated one of my apps to use the latest version, but am now seeing my product detail screens get rendered in a loop. This seems to be caused by loading the price for the product from Apple.
My products come from my own api. As I don't know these in advance I have to load the price of each product using the sku retrieved from the API. Each product is displayed using a simple get and cache function that calls getProducts and then caches the resulting price into local storage.
This used to work fine, but now it seems beacuse the withIAPContext HOC caches the products itself this results in a re-render of the entire tree, resulting in the API to be called again and therefore the price rendered / retrieved again. Eventually this crashes the app.
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 updated one of my apps to use the latest version, but am now seeing my product detail screens get rendered in a loop. This seems to be caused by loading the price for the product from Apple.
My products come from my own api. As I don't know these in advance I have to load the price of each product using the sku retrieved from the API. Each product is displayed using a simple get and cache function that calls
getProducts
and then caches the resulting price into local storage.This used to work fine, but now it seems beacuse the
withIAPContext
HOC caches the products itself this results in a re-render of the entire tree, resulting in the API to be called again and therefore the price rendered / retrieved again. Eventually this crashes the app.Am I doing something wrong or is this a bug?
Beta Was this translation helpful? Give feedback.
All reactions