react-native-modalize
react-native-modalize copied to clipboard
How to access useModalize hook
In the documentation there is useModalize hook but I can't see where you import it.
import { useModalize } from 'react-native-modalize/lib/utils/use-modalize'; I imported it from here, but not sure this is how it is supposed to be imported honestly. Thanks
hi, did u used useModalize without problem? Can u give some example? Thanks
hi, did u used useModalize without problem? Can u give some example? Thanks
Yes I do use it, sure.
import { useModalize } from 'react-native-modalize/lib/utils/use-modalize';
const { ref, open, close } = useModalize();
i have multi modalize in some component of app, i wonder how to call each modal by ref or id? Bro did u solved this?
i have multi modalize in some component of app, i wonder how to call each modal by ref or id? Bro did u solved this?
You can simply call it twice as in;
const { ref: refOne, open: openOne, close: closeOne } = useModalize();
const { ref: refTwo, open: openTwo, close: closeTwo } = useModalize();
I haven't tried but this should work.
thanks u so much