OKOGASAWARA KAKERUinkkr-netxjs-blog.hashnode.dev·1d ago · 4 min readNext.js ~API Routes 2~API route for Next.js is a valuable feature that you can call API from browser. What is used for ?In case you access data base from browser, Browser ↓ MongoDB There is a risk for security You c00
OKOGASAWARA KAKERUinkkr-netxjs-blog.hashnode.dev·1d ago · 2 min read Next.js ~Client Component vs Server Component~Basic thought In App Router, all components are Server Component by default.If you make it to client, you have to defene 'use client' on the top of the file. Server Component Client Component D00
OKOGASAWARA KAKERUinkkr-netxjs-blog.hashnode.dev·Jun 26 · 1 min readNext.js ~API Routes~With API Routes(or Route Handlers) of Next.js, you can build the API endpoint in the application directly without an extra server. There are two ways: App Router and Pages Router. Each of them has a d00
OKOGASAWARA KAKERUinkkr-netxjs-blog.hashnode.dev·Jun 23 · 3 min readNext.js ~Searchparams~Server Component(Page component)You fetch searchParams from the Props of the page on the server. ⚠️ Caution: Since Next.js15, you need await to get the searchParams. And you cannot get the searchParam00
OKOGASAWARA KAKERUinkkr-netxjs-blog.hashnode.dev·Jun 16 · 3 min readNext.js ~Server and Client Components~By default, layouts and pages are Server Components, which lets you fetch data and render parts of your UI on the server, optionally cache the result, and stream it to the client. When you need intera00