Here are a partial answer, important considerations, and possible starting points for further research.
Screen Size
Unless you have the resources to create completely separate views for small and large screens, one way to make your app look reasonable on a desktop/laptop screen is to add horizontal margins. This can be accomplished by wrapping your
app Navigator with a View like:
<View
onLayout={this._handleLayout}
style={[styles.appContainer, this.state.isWide && styles.wide]}>
and
_handleLayout = ({ nativeEvent }) => {
const { width } = nativeEvent.layout;
this.setState(() => ({ isWide: width > 600 }));
};
Tab bar, Header, and other navigation elements
React Navigation has built-in support for headers and tab bars, however, a standard mobile layout with on a desktop/laptop screen looks ugly. Since you are probably using navigator components designed for mobile, like createBottomTabNavigator
and createDrawerNavigator
, one option is to make custom navigator(s) for the desktop layout. This may require some work since there are no standard navigator components for desktop layouts.
Another problem is that you may want your header bar to be different, since there's more space to add navigation elements, search bar, etc. React Navigation doesn't provide examples on how to do this, so it may be difficult.
Web URLs, router, server rendering, etc.
React Navigation 3.x docs say that web support should be considered experimental and provides sparse guidance on these issues. The react-navigation/web module provides "Tools for react-navigation on web browsers and servers" but little documentation. An example for setting up a simple web app using SwitchRouter can be found here. However, I could not find any info on using URL parameters with routes.