'styles' prop not working for react-iframe

What I Wanted to Do

I want to use the styles prop.
I followed the documentation here: https://www.npmjs.com/package/react-iframe

What Happened Instead

I get this Warning instead: Warning: Unknown prop styles on <iframe> tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop

Reproduction Steps

(You might get an answer here, but because this forum is focused on npm, you might want to ask your question somewhere that targets experts with your package. I have moved your topic to #community:javascript)

You could also try asking at: https://github.com/svenanders/react-iframe/issues

I don’t see the warning on repl.it, is it visible only on an actual project running directly on the browser? Also, I think you should init the state as follows:

constructor(props) {
  this.state = {
    iFrameWidth: document.documentElement.clientWidth,
    iFrameHeight: document.documentElement.clientHeight

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.