I am new to Next.js and I want to know, What new data fetching patterns have been explored by Next.js 13.4.9? How well does dynamic data fetching work?
For example, if you wanted to fetch some data, the original version of Next.js looked like this:
import React from 'react';
import 'isomorphic-fetch';
export default class extends React.Component {
static async getInitialProps() {
const resp = await fetch('https://api.company.com/user/12345');
const data = await resp.json();
return { username: data.profile.username };
}
}
What new data fetching patterns have been explored by Next.js 13.4.9?