Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
timolins opened this issue Oct 7, 2020 · 0 comments
Open

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

timolins opened this issue Oct 7, 2020 · 0 comments

Comments

@timolins
Copy link
Member

timolins commented Oct 7, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant