Notes on NextJS 13
Notes on NextJS 13
There is app directory and 70% of application will be there and 30% of application
will be outside of this app directory.
app/Page.tsx index.js of the app
./tailwind.config.ts tailwind configuration theme color …
url ourdomain.com/ourroute/route
app <ourroute>/<route>/page.tsx
Navigation In NextJS
Rendering
Client side rendering: user make request to the server
and the server responses a data with a java-script bundle
and java-script bundle renders data received from the
server.
Server side rendering: when user makes request to the
server then the server responds the whole HTML page and
necessary data to the client there is no parse or bundle.
In NextJS we have both server side and client side
component,
In NextJS server side component is default component
dependency's stay in server, better performance.
page.tsx
const = Search({searchParams})
{ console.log(searchParams.q) }
We can add loading state and UI by adding loading.tsx to
the root app folder.