Comments (3)
Did you try importing the component as the default, as the second warning says?
import Iframe from 'react-iframe'; (notice the lack of {} wrapping Iframe)
The warning is just VS code complaining that there is no file to map props to types, so you get no intellisense/type checking on the props, but shouldn't break your build (if you get the type wrong, it might break at run time though)
from react-iframe.
I have rewritten this project in TS, so the upcoming 1.7 release will be compatible :)
from react-iframe.
I've got the following error with my code:
Type error: Could not find a declaration file for module 'react-iframe'. 'Client/node_modules/react-iframe/index.min.js' implicitly has an 'any' type.
Try `npm install @types/react-iframe` if it exists or add a new declaration (.d.ts) file containing `declare module 'react-iframe';` TS7016
PayButton.tsx:
import React from 'react';
import Iframe from 'react-iframe';
export const PayButton = () => {
return (
<Iframe
src="blablabla"
/>
)
}
from react-iframe.
Related Issues (20)
- Get iframe current playing time HOT 1
- Its element type 'ReactElement<any, any> | Component<IIframe, any, any> | null' is not a valid JSX element. HOT 2
- Hide Iframe URL in the browser HTML HOT 1
- Bug: prop name is `allowFullScreen` HOT 2
- It's Clipboard read & write allowed? HOT 1
- Uncaught DOMException: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document.
- Check if user scroll till the end
- Hide scrollbars but be able to scroll
- Access duration of a video
- correct README.md array with square brackets for sandbox multiple values
- How to listen to URL changes inside the iframe and prevent URL from redirecting! HOT 3
- Bug: Camelcase 'allowFullScreen' doesn't work when 'allow' attribute is set
- Issue serving built CRA app with <Iframe src="./public/myfile.html">
- Sandbox type does not allow multiple values HOT 2
- Render HTML file from src HOT 1
- onLoad function Safari support HOT 2
- PDF in iframe on iPad - only first page is displayed HOT 1
- Expo support ? HOT 1
- allowFullScreen doesn't work for Chrome HOT 1
- how to resolve the cross domain because of iframe? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-iframe.