You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In VS Code if I hover over the import statement I get this test in a popup:
Could not find a declaration file for module 'react-iframe'. 'c:/cloudguest/src/client-admin/react-material.eval/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';ts(7016)
When I run I get an error:
Check your code at App.js:43.
in Route (at App.js:43)
in Switch (at App.js:40)
in div (at App.js:34)
in App (at src/index.js:9)
in Router (created by BrowserRouter)
in BrowserRouter (at src/index.js:8)
Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
index.js:1452
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)
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
In VS Code if I hover over the import statement I get this test in a popup:
Could not find a declaration file for module 'react-iframe'. 'c:/cloudguest/src/client-admin/react-material.eval/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 containingdeclare module 'react-iframe';
ts(7016)When I run I get an error:
Check your code at App.js:43.
in Route (at App.js:43)
in Switch (at App.js:40)
in div (at App.js:34)
in App (at src/index.js:9)
in Router (created by BrowserRouter)
in BrowserRouter (at src/index.js:8)
Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
index.js:1452
Here is how I am trying to use it:
import { Iframe } from 'react-iframe';
<Route path="/api-docs-swagger" render={props => <Iframe url='/api-docs-swagger' />} />
The text was updated successfully, but these errors were encountered: