Skip to content

Commit a1f45be

Browse files
v3.0.0-beta-1 (#718)
Co-authored-by: Matt Herbst <[email protected]>
1 parent 18b27d9 commit a1f45be

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# CHANGELOG
22

3+
## (BETA) 3.0.0 (15 Jul 2024)
4+
5+
React 19 support + API modernization [717](https://github.com/MatthewHerbst/react-to-print/pull/717)
6+
7+
### BREAKING CHANGES
8+
9+
- `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
10+
- React ^16.8.0 required (dropped support for React versions that don't support hooks)
11+
- `onBeforeGetContent` removed. Use `onBeforePrint`
12+
- `removeAfterPrint` renamed to `preserveAfterPrint` which defaults to `false`
13+
- `ReactToPrint` removed. Use `useReactToPrint`
14+
- `PrintContextConsumer` removed. Use `useReactToPrint`
15+
- `trigger`removed, call the function returned by `useReactToPrint`
16+
- `IReactToPrintProps` renamed to `UseReactToPrintOptions`
17+
- Default package export removed, use named `useReactToPrint` export
18+
- Build is now ES6 code. Previously it was ES5
19+
- No longer officially support IE11 (will still try but no promises)
20+
321
## 2.15.1 (February 13th, 2024)
422

523
- 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.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-to-print",
3-
"version": "2.15.1",
3+
"version": "3.0.0-beta-1",
44
"description": "Print React components in the browser",
55
"main": "lib/index.js",
66
"types": "lib/index.d.ts",

0 commit comments

Comments
 (0)