Split component into `<NotionPage/>` and `<NotionRenderer/>`
timolins opened this issue · 0 comments
Now that that react-notion has been out for sometime, two main use-cases have established:
-
As content renderer for blogs, documentation or websites. I like to think of it Markdown renderer, but instead of Markdown it is powered by Notion.
-
As fast Notion replacement. More and more folks use Notion to build websites, but the real deal is too slow & limiting.
At the moment we do both, but handle the specific use-cases with props like fullPage, which mixes those concerns.
Proposal
Extract some functionality (fullPage, disableHeader) to a new component called <NotionPage/>. This would result in the following benefits:
- Leaner core - Remove unnecessary options & dependencies from the
<NotionRenderer/>. - More flexibility - By moving all Notion page related stuff into its own component, we can start to add more functionality to it, without affecting the core. That would be things like:
- Twemoji fallback (#24)
- Darkmode
- Support for an image lightbox: medium-zoom
We are currently beta testing a support for custom components, which should make this separation possible - See #30