3 ms·
>Next.js now enables you to do data fetching at the component level, all expressed as JSX. By using React Server components, we can simplify things. Special fun
by sandGorgon 5y ago
>Next.js now enables you to do data fetching at the component level, all expressed as JSX. By using React Server components, we can simplify things. Special functions like getServerSideProps or getStaticProps are no longer needed. This aligns with the React Hooks model of colocating data fetching with your components.
Do you see getServerSideProps and getStaticProps going away in the next release or two ?
- 1_player 5y agoHow often are they going to change their data fetching APIs?! There's libraries still using getInitialProps (like urql), now deprecated, because getServerSideProps and getStaticProps that were in vogue until now had very different semantics, and they're changing them again? I'm so glad I'm not maintaining the Next project at work anymore, I very much dislike how often it is changing yet it's still very restrictive. The JS ecosystem and the pace of change it's forcing on people with deadlines is ridiculous. /rant
- rglover 5y agohttps://cheatcode.co/meta/introducing-joystick-the-full-stack-javascript-framework https://cheatcode.co/meta/introducing-joystick-the-full-stac...
- shuding 5y agoNo, these will not be going away in the near future as far as we can see. React 18 / RSC are still in alpha or experimental stage, and what we shared are just new ways to do data fetching that we are currently exploring. In fact, component-level data fetching doesn’t conflict with top-level data fetching like gSP and gSSP. Today you can already use gSSP with Suspense-based data fetching together with Next.js 12. It’s just that you normally don’t need to use both, doesn’t mean you can’t :)