Render your React app to an iFrame
https://github.com/ryanseddon/react-frame-component/compare/v5.2.5...v5.2.6
This release uses DOMContentLoaded
as a better strategy over onload
when more complex intitialContent payloads are provided.
This also accounts for timing issues and uses setInterval
to account for cold cache timing issues on resource intensive frames.
https://github.com/ryanseddon/react-frame-component/compare/v5.2.4...v5.2.5
https://github.com/ryanseddon/react-frame-component/compare/v5.2.3...v5.2.4
Building on v5.2.2-alpha.1 if DOMContentLoaded never fires we fallback with a setInterval
https://github.com/ryanseddon/react-frame-component/compare/v5.2.2-alpha.1...v5.2.3-alpha.0
https://github.com/ryanseddon/react-frame-component/compare/v5.2.2...v5.2.3
This adds types directly to the package. You'll no longer need to rely on @types/react-frame-component
https://github.com/ryanseddon/react-frame-component/compare/v5.2.1...v5.2.2
Building on v5.2.2-alpha.0 to try removing forceUpdate
, guarding against a double state update and re-introducing the onLoad
attribute.
https://github.com/ryanseddon/react-frame-component/compare/v5.2.2-alpha.0...v5.2.2-alpha.1
This is a pre-release testing whether using DOMContentLoaded is a better strategy over onload when more complex intitialContent
payloads are provided.
https://github.com/ryanseddon/react-frame-component/compare/v5.2.1...v5.2.2-alpha.0
https://github.com/ryanseddon/react-frame-component/compare/v5.2.0...v5.2.1
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.
Example usage:
function Foo() {
const iframeRef = React.useRef()
React.useEffect(() => {
iframeRef.style.setProperty('background-color', 'pink');
}, [])
<Frame ref={iframeRef} />
}
https://github.com/ryanseddon/react-frame-component/compare/v5.1.0...v5.2.0