diegomura / diegomura/react-pdf

Breaks in Next.js app router in combination with useSWR

Open
#2,775 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
16.8k
Forks
1.3k
Avg merge
5h 6m
Merged PRs (30d)
52

Description

**Describe the bug**
When trying to use the `useSWR` hook from https://swr.vercel.app/ my application breaks and throws the following error:

```
TypeError: dispatcher.useSyncExternalStore is not a function
```

**To Reproduce**
1. Create a basic Next.js app router project
1. Create a PDF where you render a PDF
2. Use the `useSWR` hook on the same page

**Expected behavior**
It should work

**Desktop (please complete the following information):**

- OS: macOS
- Browser: Google Chrome
- React-pdf version: 3.4.4

Please let me know if you need additional information

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.