Skip to content

Commit

Permalink
Update README.md to address issues #401 and #412 (#414)
Browse files Browse the repository at this point in the history
Explaining solutions for problems like in the issue #401 and #412
  • Loading branch information
hisamafahri authored Sep 12, 2021
1 parent 61ca4ec commit 02c8ce1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,12 @@ const Example = () => {
};
```

**Note ([401](https://github.com/gregnb/react-to-print/issues/401)):** In TypeScript, if you encounter `componentRef.current` error such as: `Type 'undefined' is not assignable to type 'ReactInstance | null'.`, add `null` inside the `useRef()`:
```
const componentRef = useRef(null);
```


## Known Issues

- `onAfterPrint` may fire immediately (before the print dialog is closed) on newer versions of Safari where [`window.print`](https://developer.mozilla.org/en-US/docs/Web/API/Window/print) does not block
Expand Down

0 comments on commit 02c8ce1

Please sign in to comment.