agentcooper / react-pdf-highlighter

Set of React components for PDF annotation
https://agentcooper.github.io/react-pdf-highlighter/
MIT License
1.03k stars 406 forks source link

how to use it? #8

Closed AdrianLsk closed 6 years ago

AdrianLsk commented 6 years ago

Hi @agentcooper, I have a noob question.

Is it implemented in typescript language? I am a bit confused by strong typing in the code. NB: I am a javascript beginner.

agentcooper commented 6 years ago

Hey, @AdrianLsk.

The types are coming from Flow - static type checker for JavaScript.

With TypeScript you need to compile the whole project with the TS compiler to get JavaScript. With Flow you use Babel plugin to strip off types and continue transpiling as usual.

As a user of react-pdf-annotator you can either just use JS without caring about Flow or add Flow to your project and get the benefits of static type checking.

AdrianLsk commented 6 years ago

I see, got it! Thanks @agentcooper !