ConstAccepts a flow object and optional event handler props. Under the hood, it creates a native view and subscribes to flow events.
The view is embedded in your React tree, so its lifecycle is controlled by
your app — not by the SDK. Event handlers still run (and their side effects
apply), but the boolean they return does NOT dismiss the embedded view: that
"close" flag only applies to the imperative view created via
createFlowView. To dismiss the embedded view, stop rendering it
(e.g. flip state in onCloseButtonPress):
const [visible, setVisible] = useState(true);
const onCloseButtonPress = useCallback(() => {
setVisible(false); // unmount to dismiss; return value is ignored here
}, []);
return visible ? (
<AdaptyFlowView flow={flow} onCloseButtonPress={onCloseButtonPress} />
) : null;
AdaptyFlowViewProps for available props
React component that renders a native flow view.