Next.js is a React framework, so the code in our React tutorial will work.
However, Next.js also uses SSR, which does not work with amCharts. In order to use amCharts with Next.js, you must disable SSR for your amCharts component:
const ChartComponent = dynamic(() => import('./components/chart'), { ssr: false }); function App() { return <ChartComponent />; }