Skip to content

Commit

Permalink
v3.0.0-beta-1
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewHerbst committed Jul 15, 2024
1 parent 18b27d9 commit a68f0f1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# CHANGELOG

## (BETA) 3.0.0 (15 Jul 2024)

React 19 support + API modernization [717](https://github.com/MatthewHerbst/react-to-print/pull/717)

### BREAKING CHANGES

- `content` renamed to `contentRef` and type changed from `() => React.ReactInstance` to `RefObject<Element | Text>`. The core impact here is that Class components now need to have the ref forwarded via props internally to a DOM node
- React ^16.8.0 required (dropped support for React versions that don't support hooks)
- `onBeforeGetContent` removed. Use `onBeforePrint`
- `removeAfterPrint` renamed to `preserveAfterPrint` which defaults to `false`
- `ReactToPrint` removed. Use `useReactToPrint`
- `PrintContextConsumer` removed. Use `useReactToPrint`
- `trigger`removed, call the function returned by `useReactToPrint`
- `IReactToPrintProps` renamed to `UseReactToPrintOptions`
- Default package export removed, use named `useReactToPrint` export
- Build is now ES6 code. Previously it was ES5
- No longer officially support IE11 (will still try but no promises)

## 2.15.1 (February 13th, 2024)

- FIX [686](https://github.com/MatthewHerbst/react-to-print/pull/686) A breaking type error was mistakenly introduced as part of [652](https://github.com/MatthewHerbst/react-to-print/issues/652). This has been fixed.
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-to-print",
"version": "2.15.1",
"version": "3.0.0-beta-1",
"description": "Print React components in the browser",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down

0 comments on commit a68f0f1

Please sign in to comment.