Skip to content

Split component into <NotionPage/> and <NotionRenderer/> #37

Open
@timolins

Description

@timolins

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:

We are currently beta testing a support for custom components, which should make this separation possible - See #30

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions