Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Next.jsのレンダリング環境とキャッシュについて

Avatar for firstclimbkazu firstclimbkazu
February 27, 2025
14

 Next.jsのレンダリング環境とキャッシュについて

以下についてをまとめました。
- クライアント・サーバーコンポーネント
- CSR/ SSR/ SSG/ ISR

Avatar for firstclimbkazu

firstclimbkazu

February 27, 2025

Transcript

  1. actions.ts 'use server' export default async function action = (arg)

    = { ... } useActions.tsx import action from './action' const useAction = () = { const arg = { -> const arg = 'a'; ならOK 又はオブジェクト型をJSONへparseして一つの文字列へ A: 'A', }; return ( <button onClick={() => action(arg)} -> エラー > action </button> ) }