15
loading...
This website collects cookies to deliver better user experience
/api/
. This goes back to my very first point about this being a super duper opinionated framework, where you can't even control your endpoints. I really don't want my UI framework to get to say where my api endpoints should live in my application...I forgot I needed this bit of data. I really can't be bothered to create an abraction that retrieves the data I need in a sensible, testable context...
import { db } from '@/db';
const bitOfData = db.query(...)
I'll totally come back and refactor this later.
For the initial page load, getInitialProps will run on the server only. getInitialProps will then run on the client when navigating to a different route via the next/link component or by using next/router. However, if getInitialProps is used in a custom _app.js, and the page being navigated to implements getServerSideProps, then getInitialProps will run on the server.
So if you're not using next.js I guess you'll go back to CRA then?
vite
. It's still somewhat opinionated and it's super-low config but I've not yet hit an issue I couldn't easily solve with a little config.