const MailtoUI = require('../node_modules/mailtoui/dist/mailtoui-min')
function App() {
useEffect(() => {
MailtoUI.run()
}, [])
return (
// code with MailtoUI a tag
);
}
Error:
Uncaught TypeError: MailtoUI.run is not a function
at App.jsx?t=1688628587499:29:14
at commitHookEffectListMount (react-dom_client.js?v=24e21016:16438:34)
at commitPassiveMountOnFiber (react-dom_client.js?v=24e21016:17679:19)
at commitPassiveMountEffects_complete (react-dom_client.js?v=24e21016:17652:17)
at commitPassiveMountEffects_begin (react-dom_client.js?v=24e21016:17642:15)
at commitPassiveMountEffects (react-dom_client.js?v=24e21016:17632:11)
at flushPassiveEffectsImpl (react-dom_client.js?v=24e21016:18985:11)
at flushPassiveEffects (react-dom_client.js?v=24e21016:18942:22)
at commitRootImpl (react-dom_client.js?v=24e21016:18911:13)
at commitRoot (react-dom_client.js?v=24e21016:18772:13)
I tried using it with vite react via npm: Code:
Error: