File tree 1 file changed +22
-1
lines changed
1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change 3
3
[ ![ npm] ( https://img.shields.io/npm/v/react-native-use-modal?color=brightgreen )] ( https://www.npmjs.com/package/react-native-use-modal )
4
4
[ ![ npm] ( https://img.shields.io/npm/dw/react-native-use-modal )] ( https://www.npmjs.com/package/react-native-use-modal )
5
5
6
- A way to create a modal that is easy to reuse, easy to encapsulate, and returns the result as a Promise .
6
+ A way to create a modal that is easy to reuse, easy to encapsulate, and returns the result as a promise .
7
7
8
8
The goal of ` react-native-use-modal ` is to make all the functions of ` react-native-modal ` available and convenient to use at the same time.
9
9
@@ -40,6 +40,27 @@ const App = () => {
40
40
};
41
41
```
42
42
43
+ If you are already using a different provider, make the ` ModalProvider ` a child of the other provider.
44
+ Otherwise, the modal will not get the values broadcast by other providers.
45
+
46
+ ``` tsx
47
+ import {Provider } from ' react-redux' ;
48
+
49
+ const App = () => {
50
+ return (
51
+ <Provider store = { store } >
52
+ <FooProvider >
53
+ <BarProvider >
54
+ <ModalProvider >
55
+ // ...
56
+ </ModalProvider >
57
+ </BarProvider >
58
+ </BarProvider >
59
+ </Provider >
60
+ );
61
+ };
62
+ ```
63
+
43
64
## Usage
44
65
45
66
### Declare modal as hook with ` createUseModal `
You can’t perform that action at this time.
0 commit comments