react-pdf icon indicating copy to clipboard operation
react-pdf copied to clipboard

Throw more comprehensive error when rendering text outside `<Text />`

Open diegomura opened this issue 4 years ago • 4 comments

We should throw a clear error message when something like this happens:

<Document>
  Hello world!
 </ Document>

diegomura avatar Jul 25 '21 21:07 diegomura

Hi, thank you for creating this great library. I would like to help this project to be perfect. How would you consider the Error boundary & criteria for this issue? Is the issue only related to situations when there are no <Page/> or <Text/> components present as children?

Sinakhx avatar Jul 26 '21 10:07 Sinakhx

Hi @Sinakhx ! I'm not sure if error boundaries would work for this purposes, but maybe I'm wrong 😄 This is about not allowing text as children of any component that it's not <Text /> or <Link />

diegomura avatar Jul 26 '21 13:07 diegomura

Hey @diegomura I could take a stab at it, I cloned the repo on my machine but couldn't find the instructions to setup up and run the project, am I missing something?

letsandeepio avatar Aug 09 '21 21:08 letsandeepio

Hello @diegomura! I have been using React-PDF off-and-on for about a year and a half now, and I am looking for an OS project to help support (first time). Do you recall if this issue has been addressed yet? This issue sounds like this should be reasonable.

byron-ojua avatar Apr 16 '25 00:04 byron-ojua