Skip to content

v5.2.0

Choose a tag to compare

@ryanseddon ryanseddon released this 02 Dec 03:23
· 47 commits to master since this release

Forwarding iframe ref

Allow to pass ref prop to Frame component which will allow to reach the inner iframe HTMLIFrameElement.
The ref forwarding is done by React.forwardRef helper which wraps the original Frame class component instance.

  • Forward iframe ref and use React.createRef (#189) b68a2f2

Example usage:

function Foo() {
  const iframeRef = React.useRef()

  React.useEffect(() => {
    iframeRef.style.setProperty('background-color', 'pink');
  }, [])

  <Frame ref={iframeRef} />
}

Other changes

v5.1.0...v5.2.0