Just wanted to mention you can in Nextjs also access your db from your conponents.
Not like in Blitz. In Next you have to use getServerSideProps or getStaticProps (those also work in Blitz) which isn't actually "in your component".
In Blitz, you can use queries and mutations from anywhere in your tree, not just the top level page hooks mentioned above.
Here's more details on the differences: blitzjs.com/docs/why-blitz
I mean sure blitz needs to have a bit more if its a framework built on top Nextjs. But in general in nextjs it works in the root components.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Just wanted to mention you can in Nextjs also access your db from your conponents.
Not like in Blitz. In Next you have to use getServerSideProps or getStaticProps (those also work in Blitz) which isn't actually "in your component".
In Blitz, you can use queries and mutations from anywhere in your tree, not just the top level page hooks mentioned above.
Here's more details on the differences: blitzjs.com/docs/why-blitz
I mean sure blitz needs to have a bit more if its a framework built on top Nextjs. But in general in nextjs it works in the root components.