We're using Create React App here as it's still the simplest way to get an instant React project up and running with minimal complexity:Įnter fullscreen mode Exit fullscreen mode We'll begin by creating the project directory and React app. Anything on the client side is always visible to the user.īy querying on the server we can keep the credentials there, out of reach of the front end, and only provide the database table data itself to the front end. The reason we need the Node server is because if we were to query directly from our React app, we would have to expose our Notion account credentials and secret/database ID. React App -> Node server -> Notion database So without further delay, let's play around with it. It can also be a great way to collaborate with less technical folks and allow them the flexibility that Notion offers for creating content, and giving developers the ability to directly reference that content in code. However, for fun little projects I think it's a great option, especially for front end developers who don't have a lot of existing knowledge about databases and just want to get their feet wet. I do not know anything about the actual speed and performance of querying it at any scale, and I also wouldn't trust any critical data on a service that isn't specifically designed to offer a reliability guarantee. I want to be clear that I am absolutely not advocating for the use of Notion as a real database for a production application. They also have fantastic support for simple databases (even relational ones) so I thought it would be fun to try a little app that could use Notion as a quick and dirty CMS, and I had a lot of fun doing it, so I thought I would write up a little tutorial to share the process with others. Recently I discovered that Notion provides an API to read and modify data on your Notion workspace. Similar products you might be familiar with would be something like Confluence, Evernote or OneNote. It can be used for anything from organizing daily tasks, keeping track of school schedules, to managing the documentation of large enterprise projects.īasically if you want to "organize" any kind of information, Notion is a great tool for that. It's basically an organizational tool that runs in the cloud and supports multiple user collaboration at the same time. This tutorial is available as a video lesson if you prefer that format:īefore we jump in I want to explain quickly a little bit what Notion is. If you find this tutorial helpful, please share it with your friends and colleagues! For more like it you can subscribe on Youtube or follow me on Twitter. All code from this tutorial as a complete package is available in this repository.
0 Comments
Leave a Reply. |