13
Cross platform map for react & react-native
source link: https://reactnativeexample.com/cross-platform-map-for-react-react-native/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Cross platform map for react & react-native
Jul 08, 2022
1 min read
@teovilla/react-native-web-maps
Cross platfrom maps for react & react-native
Installation
$ yarn add @teovilla/react-native-web-maps
Usage with Expo web / Webpack
For this to work you must alias react-native-maps
to @teovilla/react-native-web-maps
in your webpack config.
Example with Expo Web:
// webpack.config.js
module.exports = async function (env, argv) {
const config = await createExpoWebpackConfigAsync(env, argv);
config.resolve.alias['react-native-maps'] = '@teovilla/react-native-web-maps';
return config;
};
Example with Next.js:
// next.config.js
module.exports = {
webpack: (config) => {
config.resolve.alias = {
...(config.resolve.alias || {}),
'react-native-maps$': '@teovilla/react-native-web-maps',
};
return config;
},
};
Documentation
The docs for the project can be found here.
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
GitHub
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK