React Frame Component Versions Save

Render your React app to an iFrame

v5.1.0

2 years ago

Adds new useFrame hook for access to iframes window and document host objects without the need for the context render prop pattern.

  • useFrame hook (#190) 12e4cb3
import { useFrame } from 'react-frame-component';

function Foo (props) {
  const { window, document } = useFrame();

  /* rest of the component */
}

https://github.com/ryanseddon/react-frame-component/compare/v5.0.1...v5.1.0

v5.0.1

2 years ago

Adds index.ts file to declare module for Typescript

  • add declare module (#129) 1bba891
  • Bump hosted-git-info from 2.1.5 to 2.8.9 (#187) b133def
  • Bump ua-parser-js from 0.7.12 to 0.7.28 (#186) 25d5b8f
  • Bump sockjs from 0.3.18 to 0.3.21 (#184) 1678466

https://github.com/ryanseddon/react-frame-component/compare/v5.0.0...v5.0.1

v5.0.0

3 years ago

This is a breaking change

This library now uses srcDoc which means no support for IE11 in v5 if you need IE11 support you can continue to use v4.1.3.

srcDoc is also async vs doc.write being sync, this will mostly go unnoticed in most use cases. However if you're relying on this library in unit tests you may need to convert those test to async aware tests. This means you'll need to use the done callback in most unit test frameworks.

Why the change?

document.write is now bad practice for performance reasons and will be flagged accordingly in various web perf testing tools, srcDoc is a viable alternative without the perf downsides.

Commits

  • Switch karma to use chrome canary (#183) efea53c
  • Fix doc.write violation by using srcDoc (#124) 5d690fe
  • Trigger on pull_request 2dc373d
  • Bump ini from 1.3.4 to 1.3.7 (#179) 016c84c
  • Remove travis ci 958496b
  • Setup ci action 2e3e014
  • funding 931304d

https://github.com/ryanseddon/react-frame-component/compare/v4.1.3...v5.0.0

v5.0.0-alpha.0

3 years ago

This pre-release is testing whether srcdoc usage over doc.write() is a better move going forward. It's a breaking change as srcdoc is async.

By changing to srcdoc this will drop support for IE11.