Closed jameschetwood closed 2 years ago
No work was put into supporting Web. I'm been a bit busy lately. You are welcome to make PR for web support.
@jameschetwood did you end up finding a solution for web? CC https://github.com/SteffeyDev/react-native-popover-view/issues/82
Added PR https://github.com/AndreiCalazans/rn-tooltip/pull/65 to support hover events for tooltip in react-native-web.
Opened #82 to support web.
Tested on Expo Go, Android Simulator and Expo Web
Installation (directly from repo), package.json
:
"dependencies": {
...
"rn-tooltip": "git+https://github.com/BossBele/rn-tooltip.git"
},
- Expo using babel `babel.config.js`:
module.exports = function (api) { api.cache(true); return { presets: ['babel-preset-expo'], plugins: [['@babel/plugin-proposal-decorators', {legacy: true}]], }; };
- Expo web using webpack `webpack.config.js`:
const createExpoWebpackConfigAsync = require('@expo/webpack-config');
module.exports = async function (env, argv) { const config = await createExpoWebpackConfigAsync( { ...env, babel: { dangerouslyAddModulePathsToTranspile: [ // Ensure that all packages here are transpiled. 'rn-tooltip', ], }, }, argv, ); config.resolve.symlinks = true; // Customize the config before returning it. return config; };
It's not in my intention to extend this library to support web. Feel free to fork it and use your own version. Thank you for understanding.
Does this library work with React Native Web? It doesn't work with this simple Expo Snack: https://snack.expo.io/@jamesweblondon/intelligent-yogurt