NotionX / react-notion-x

Fast and accurate React renderer for Notion. TS batteries included. ⚡️
https://react-notion-x-demo.transitivebullsh.it
MIT License
4.75k stars 552 forks source link

Why use `notion-client` over `@notionhq/client`? #457

Open janek opened 1 year ago

janek commented 1 year ago

Description

notion-client is an npm package that's part of this repository, with description "Robust TypeScript client for the unofficial Notion API." . I was wondering why it's used over the official @notionhq/client. I'm sure there's a reason (TS?) - but perhaps it should be mentioned in the docs along with some advice on how to choose between them.

transitive-bullshit commented 1 year ago

Agreed we could definitely improve the docs here.

notion-client came way before the official client was released, and the official client doesn't support all block types and is extremely inefficient for some reason. More detail here https://github.com/NotionX/react-notion-x/tree/master/packages/notion-compat

janek commented 1 year ago

That makes a lot of sense, thank you for answering so quickly (and for all your work)! I did have some weird timeouts using the official API, maybe I'll switch then :)

Leaving it up to you if you want the issue open or closed.

rowthan commented 1 year ago

Is there an API doc for unofficial API?I just want know what kind of API can be call with https://www.notion.so/api/v3