What is the correct way to pass the parameters to the NavigationDialog
function so that it can be used wherever I want?
In my example I tried to pass the parameters but I think something is wrong with isVisible
parameter.
import React, { useState } from 'react';import { Popup } from 'react-native-map-link';import styles from './NavigationDialogStyle';const NavigationDialog = ({ latitude: number, longitude: number, isVisible: boolean }) => { const [isVisible, setIsVisible] = useState(false); const options = { latitude: latitude, longitude: longitude, dialogTitle: 'open with', dialogMessage: 'what app to use ?', cancelText: 'close, }; return (<Popup isVisible={isVisible} onCancelPressed={() => setIsVisible(false)} onAppPressed={() => setIsVisible(false)} onBackButtonPressed={() => setIsVisible(false)} modalProps={{ animationIn: 'slideInUp', }} appsWhiteList={['waze', 'google-maps']} options={options} style={{ container: styles.popupStyle }} /> );}export default NavigationDialog;