I wanted to use this popup component from GitHub
I installed it using npm (I don't know how to do it otherwise).I imported it to my App.js
import { Root, Popup } from 'popup-ui'
After importing it, I get this message:
Could not find a declaration file for module 'popup-ui'.
'c:/Repos/Budgeteer/node_modules/popup-ui/index.js' implicitly has an 'any' type.
Try
npm install @types/popup-ui
if it exists or add a new declaration (.d.ts) file containing `declare module'popup-ui';`ts(7016)
@types/popup-ui does not exist. I got no idea what declaration means (total noob here). And I looked up ts(7016), and again I couldn't figure out what to do exactly, being a beginner.
When compiling, I get this issue:
C:/Repos/Budgeteer/node_modules/popup-ui/src/basic/Popup/index.js 10:1
Module parse failed: Unexpected token (10:1)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.
the error comes with this piece of code:
| static popupInstance| > static show({ ...config }) {"| this.popupInstance.start(config)| }
I took a look at the link and read up on loaders, but I got no idea what type of loader I need to install, how to install it or how to edit that webpack file. I can't even seem to find it.
Any help would be deeply appreciated. But please try to make it as detailed as possible, because I'm new to all of this.
Also, I'm using React Native with Expo if that matters.Cheers.