1

I'm new to react-native. And I ran into one issue. Is it possible to use Modalize in the topmost node (before the navigator) as a context. To call it like this.

useEffect(() => {
    modal.open({
        component: <Text>TEST modal</Text>,
    })
}, [])

Main component

if (props.isOpened) {
    return (
        <Modalize
            ref={ref}
            modalHeight={390}
            handleStyle={{ backgroundColor: "transparent" }}
        >
        {props.options.component}
        </Modalize>
     )
   } else {
     return <>{props.options.component}</>
  }

Well, of course, this is possible, but is it right to do so?

qosh_dev
  • 11
  • 2

0 Answers0