Comments (9)
I regarded the original question as rather hostile.
The only reason why you would think so is because apparently it is true; this library doesn't provide any value over using a normal iframe.
But my question initially was out of interest, I was wondering if I maybe missed a special case.
Marketing this lib in that it has typescript types is not much added value either, given the fact that the html iframe tag already has types.
I think in general this library is misleading for newcomers to the ecosystem, and it could do better in actually explaining what this library does, and how people could go without.
from react-iframe.
I’m sorry you don’t understand the point of this repo.i advise you to avoid it and use something else. I further advise you to spend your time searching out other libs you don’t like or agree with and ask them to provide alternatives.
from react-iframe.
from react-iframe.
@svenanders You didn't really answer this issue, why did you close it?
This repo has alot of code in place to provide a package for this purpose. How relevant is it these days for users of React 16.6+ that could use the memo approach mentioned above?
Why aren't props forwarded via spread? You have to provide updates when a user mentions a need for attribute support that could otherwise be handled. Perhaps there's a reason for that(or at least was in the past) due to issues users faced when using this package in ways different from most?
For convenience. You you can wrap it up yourself and do the things this lib
does yourself, sure. As with most things.
The README for the repo doesn't explain what those "things" are. Some clarification would be great. I completely understand if there are special use cases or legacy reasons where this package would be a better choice.
from react-iframe.
And your comment actually emphasizes the fact;
Forwarding the props would be pointless. The repo would be ‘const Iframe = props => <iframe {...props} />’ in that case.
from react-iframe.
from react-iframe.
As with most things.
Of course, but this is becoming absurdly trivial with React 16.6.0, by using React.memo
;
export const Iframe = React.memo((props) => React.createElement('iframe', props));
from react-iframe.
Also, if this is for convenience, why not forward all the props to the <iframe />
?
from react-iframe.
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.