An open API service indexing awesome lists of open source software.

https://github.com/ekaone/knex-db

🔼⛔ Knexjs database hooks
https://github.com/ekaone/knex-db

database knexjs nextjs

Last synced: 3 months ago
JSON representation

🔼⛔ Knexjs database hooks

Awesome Lists containing this project

README

          

# Next.js Hooks Database Demo

Video: https://youtu.be/QABkof8ygzI

Fetch your props directly from the Database?!?! Adam Wathan showed a simple example of loading props directly from the database: https://twitter.com/adamwathan/status/1246144545361997829

In this video we'll explore this hook, along with two others for building static pages. Next.js 9.3 came out with 3 new hooks that allow you to fetch data in different ways:

- getServerSideProps: Fetch data server side
- getStaticPaths: Fetch data to generate static pages
- getStaticProps: Fetch data to build a static page

## Links

- Source code: https://github.com/leighhalliday/nextjs-hooks-database
- Deployed app: https://next-hooks-database.now.sh/
- Full Stack Radio episode about Next.js: http://www.fullstackradio.com/137
- Release notes for Next.js 9.3: https://nextjs.org/blog/next-9-3
- Learn JavaScript, React & more with Treehouse (affiliate link): https://treehouse.7eer.net/c/1214671/228915/3944