react-native-iap
react-native-iap copied to clipboard
withIAPContext freeze my custom context
Please use Discussion board if you want get some help out of it. Please report issue if there is a bug.
Version of react-native-iap
7.4.1
Version of react-native
0.64.2
Platforms you faced the error (IOS or Android or both?)
Both
Expected behavior
Update state of my Providers. I read data from local database and save on my context and the data does not update.
Actual behavior
Using withIAPContext
State data does not update
Tested environment (Emulator? Real Device?)
Emulator
Steps to reproduce the behavior
import React from "react";
import { Provider } from "react-redux";
import { MenuProvider } from 'react-native-popup-menu';
import { NativeBaseProvider } from 'native-base';
import { withIAPContext } from 'react-native-iap';
import AppNavigation from "./src/routes";
import store from "./src/utils/store";
import { TabProvider } from "./src/utils/TabProvider";
const Root = () => (
<Provider store={store}>
<NativeBaseProvider>
<TabProvider>
<MenuProvider>
<AppNavigation />
</MenuProvider>
</TabProvider>
</NativeBaseProvider>
</Provider>
)
export default withIAPContext(Root);
My app stuck on loading because the value on my custom context doesn't update.
@r0b0t3d May you kindly check this issue as a contributor of #1482? :pray:
Hi @ithustle , Let me try to reproduce this case. But could you please clarify
- Where is the data that didn't update? In redux's state or your custom context?
- Your app works well without
useIAPContext
?
Hi @r0b0t3d. Sorry for delay.
- My custom context. Redux state works fine.
- Yep. For now, I had to downgrade to v6.
Hi @ithustle , I created a sample repo here https://github.com/r0b0t3d/IapExample. In this example, I have a custom context that load data from async storage. But I could not reproduce the issue, the value is loaded successfully after refreshing.
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.