at my work we’re working with React native and React.
The application moves me to the React web and I tried to add a button that moves me back to React-native application without success
Hey everyone, at my work we’re working with React native and React.
on my React native application we’ve got a section that moves the user to the contact page.
TSX CODE:
<TouchableOpacity
style={styleObject.button}
onPress={() =>
WebBrowser.openBrowserAsync(CONTACT_URI)
}>
it works great, it opens the currect page on our web. I tried to add an X button that closes that window and goes back to the app like this:
TSX CODE:
{width <= 768 && <img src={closeMobileNavWhite} className='close-btn' onClick={() => {
window.close();
}} />}
is this the correct way to close the browser? the browser doesn’t close after the window.close();
Noy Leibovich is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.