DEV Community

Discussion on: Could Blitz.js be the next big JS framework?

Collapse
 
flybayer profile image
Brandon Bayer • Edited

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

Collapse
 
ivan_jrmc profile image
Ivan Jeremic • Edited

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.