{"id":2840,"date":"2023-08-25T21:25:18","date_gmt":"2023-08-25T12:25:18","guid":{"rendered":"https:\/\/edu.ujhb.org\/?p=2840"},"modified":"2023-08-25T21:25:19","modified_gmt":"2023-08-25T12:25:19","slug":"next-js%e5%85%a5%e9%96%80%ef%bc%88%e6%97%a5%e6%9c%ac%e8%aa%9e%e7%89%88%ef%bc%89","status":"publish","type":"post","link":"https:\/\/edu.ujhb.org\/?p=2840","title":{"rendered":"Next.js\u5165\u9580\uff08\u65e5\u672c\u8a9e\u7248\uff09"},"content":{"rendered":"\n<p>IT\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u30d3\u30c7\u30aa\u3092\u3084\u308a\u305f\u3044\u306e\u3067\u3059\u304c\u3001\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u306e\u5185\u5bb9\u306b\u5fdc\u3058\u3066\u30d3\u30c7\u30aa\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u30c6\u30ad\u30b9\u30c8\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u8abf\u6574\u3057\u3066\u3082\u3089\u3048\u307e\u3059\u304b\u3002 \u6b21\u306e.js\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u304b\u3089\u59cb\u3081\u307e\u3057\u3087\u3046\u3001\u305d\u3057\u3066\u3042\u306a\u305f\u306f\u79c1\u306b\u4f55\u3092\u30ab\u30d0\u30fc\u3059\u308b\u3079\u304d\u304b\u306e\u30ea\u30b9\u30c8\u3092\u4e0e\u3048\u308b\u3067\u3057\u3087\u3046\u3002 \u30c1\u30e3\u30c3\u30c8GPT<\/p>\n\n\n\n<p>\u3082\u3061\u308d\u3093\u3001Next.js\u306f\u3001\u30b5\u30fc\u30d0\u30fc\u306e\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3068\u9759\u7684Web\u30b5\u30a4\u30c8\u306e\u751f\u6210\u306b\u4f7f\u7528\u3067\u304d\u308b\u4eba\u6c17\u306e\u3042\u308bReact\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3059\u3002 \u4ee5\u4e0b\u306f\u3001\u30bf\u30fc\u30b2\u30c3\u30c8\u30aa\u30fc\u30c7\u30a3\u30a8\u30f3\u30b9\u3068\u6559\u80b2\u76ee\u7684\u306b\u9069\u5fdc\u3067\u304d\u308b\u6b21\u306e.js\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u6982\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. \u30a4\u30f3\u30c8\u30ed\u30c0\u30af\u30b7\u30e7\u30f3<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6b21\u306e.js\u306e\u7d39\u4ecb<\/li>\n\n\n\n<li>[\u6b21\u3078] \u3092\u9078\u629e\u3059\u308b\u7406\u7531.js<\/li>\n\n\n\n<li>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b7\u30ca\u30ea\u30aa<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2. \u59cb\u3081\u308b\u524d\u306b<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u958b\u767a\u74b0\u5883\u306e\u8a2d\u5b9a<\/li>\n\n\n\n<li>\u30ce\u30fc\u30c9.js\u3068npm\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/li>\n\n\n\n<li>\u6700\u521d\u306e\u6b21.js\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">3.\u30da\u30fc\u30b8\u3068\u30eb\u30fc\u30c8<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30da\u30fc\u30b8\u306e\u4f5c\u6210\u3068\u6574\u7406<\/li>\n\n\n\n<li>\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u57fa\u672c\u64cd\u4f5c<\/li>\n\n\n\n<li>\u52d5\u7684\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">4. \u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3068 CSS<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u53cd\u5fdc\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f7f\u7528\u3059\u308b<\/li>\n\n\n\n<li>\u7d44\u307f\u8fbc\u307f\u306eCSS\u304a\u3088\u3073\u30b9\u30bf\u30a4\u30eb\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8<\/li>\n\n\n\n<li>\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306e CSS \u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3059\u308b<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">5. \u30c7\u30fc\u30bf\u53ce\u96c6<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u9759\u7684\u30c7\u30fc\u30bf\u306e\u53d6\u5f97\u3092\u4f7f\u7528\u3059\u308b<code>getStaticProps<\/code><\/li>\n\n\n\n<li>\u30b5\u30fc\u30d0\u30fc\u5074\u30c7\u30fc\u30bf\u306e\u53d6\u5f97\u3092\u4f7f\u7528\u3059\u308b<code>getServerSideProps<\/code><\/li>\n\n\n\n<li>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u306e\u30c7\u30fc\u30bf\u30d5\u30a7\u30c3\u30c1<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">6. API \u30eb\u30fc\u30c6\u30a3\u30f3\u30b0<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>API \u30eb\u30fc\u30c8\u3092\u4f5c\u6210\u3059\u308b<\/li>\n\n\n\n<li>API \u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u51e6\u7406<\/li>\n\n\n\n<li>\u5916\u90e8 API \u306e\u7d71\u5408<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">7. \u6700\u9069\u5316\u3068\u30c7\u30d7\u30ed\u30a4<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6700\u9069\u5316\u624b\u6cd5<\/li>\n\n\n\n<li>\u9759\u7684\u751f\u6210\u3068\u30b5\u30fc\u30d0\u30fc\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u306e\u6bd4\u8f03<\/li>\n\n\n\n<li>Vercel\u307e\u305f\u306f\u4ed6\u306e\u30db\u30b9\u30c6\u30a3\u30f3\u30b0\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3078\u306e\u30c7\u30d7\u30ed\u30a4<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">8.\u9ad8\u5ea6\u306a\u30c6\u30fc\u30de<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u56fd\u969b\u5316<\/li>\n\n\n\n<li>\u74b0\u5883\u5909\u6570<\/li>\n\n\n\n<li>\u30ab\u30b9\u30bf\u30e0\u30b5\u30fc\u30d0\u30fc\u3068\u30df\u30c9\u30eb\u30a6\u30a7\u30a2<\/li>\n\n\n\n<li>\u30bf\u30a4\u30d7\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u4f7f\u7528<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">9. \u7d50\u3073\u306e\u8a00\u8449<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6b21\u3078.js \u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u3068\u30ea\u30bd\u30fc\u30b9<\/li>\n\n\n\n<li>\u7d99\u7d9a\u7684\u306a\u5b66\u7fd2\u3068\u958b\u767a\u306e\u9053<\/li>\n\n\n\n<li>\u6982\u8981<\/li>\n<\/ul>\n\n\n\n<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u6982\u8981\u306f\u3001\u521d\u5fc3\u8005\u304c Next.js \u306e\u4e3b\u8981\u306a\u6982\u5ff5\u3068\u6a5f\u80fd\u3092\u5b8c\u5168\u306b\u7406\u89e3\u3059\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002 \u3082\u3061\u308d\u3093\u3001\u8996\u8074\u8005\u306e\u30cb\u30fc\u30ba\u3084\u81ea\u5206\u306e\u5c02\u9580\u77e5\u8b58\u306b\u5fdc\u3058\u3066\u5fae\u8abf\u6574\u3084\u8ffd\u52a0\u307e\u305f\u306f\u524a\u9664\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u5177\u4f53\u7684\u306a\u30cb\u30fc\u30ba\u3084\u3054\u8cea\u554f\u304c\u3054\u3056\u3044\u307e\u3057\u305f\u3089\u3001\u304a\u6c17\u8efd\u306b\u304a\u554f\u3044\u5408\u308f\u305b\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/chat.openai.com\/_next\/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAAcHTtdQvKTfcfwR0bXrfLjIN0Vmoln5pVObYXE2hRFieJsISok%3Ds96-c&amp;w=96&amp;q=75\" alt=\"User\"\/><\/figure>\n\n\n\n<p>ChatGPT\u306e\u6b21\u671f.js\u7d39\u4ecb\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u6559\u3048\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<p>\u3082\u3061\u308d\u3093\u3067\u3059\uff01 Next.js \u306e\u7d39\u4ecb\u306f\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u5192\u982d\u306e\u884c\u3068\u3057\u3066\u6a5f\u80fd\u3057\u3001\u8996\u8074\u8005\u306f Next.js \u306e\u57fa\u672c\u6982\u5ff5\u3068\u305d\u308c\u304c\u4eba\u6c17\u304c\u3042\u308b\u7406\u7531\u3092\u7406\u89e3\u3067\u304d\u307e\u3059\u3002 \u542b\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3082\u306e\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6b21\u306e.js\u306e\u7d39\u4ecb<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">\u6b21\u306f\u4f55\u3067\u3059\u304b.js<\/h4>\n\n\n\n<p>\u6b21\u306b.js\u306f\u3001Vercel\u306b\u3088\u3063\u3066\u4f5c\u6210\u304a\u3088\u3073\u4fdd\u5b88\u3055\u308c\u3066\u3044\u308b\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306eReact\u30d9\u30fc\u30b9\u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3059\u3002 \u3053\u308c\u306b\u3088\u308a\u3001\u7279\u306b\u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0(SSR)\u304a\u3088\u3073\u9759\u7684\u751f\u6210(SSG)\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u69cb\u7bc9\u306b\u95a2\u3057\u3066\u3001React\u306e\u958b\u767a\u304c\u5bb9\u6613\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u30b3\u30a2\u6a5f\u80fd<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0(SSR):<\/strong>&nbsp;\u6b21\u306b.js\u30b5\u30fc\u30d0\u30fc\u4e0a\u3067React\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3067\u304d\u308b\u305f\u3081\u3001SEO\u304c\u5411\u4e0a\u3057\u3001\u30d5\u30a9\u30fc\u30eb\u30c9\u306e\u8aad\u307f\u8fbc\u307f\u901f\u5ea6\u304c\u5411\u4e0a\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u9759\u7684\u30b5\u30a4\u30c8\u751f\u6210(SSG):<\/strong>\u30da\u30fc\u30b8\u3092\u4e8b\u524d\u306b\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3057\u3066\u3001\u8aad\u307f\u8fbc\u307f\u3092\u9ad8\u901f\u5316\u3067\u304d\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u30b5\u30fc\u30de\u30eb\u30e2\u30b8\u30e5\u30fc\u30eb\u4ea4\u63db(HMR):<\/strong>\u958b\u767a\u4e2d\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3059\u308b\u3068\u3001\u30da\u30fc\u30b8\u5168\u4f53\u3067\u306f\u306a\u304f\u3001\u5909\u66f4\u3055\u308c\u305f\u90e8\u5206\u306e\u307f\u304c\u518d\u8aad\u307f\u8fbc\u307f\u3055\u308c\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u81ea\u52d5\u30b3\u30fc\u30c9\u5206\u5272:<\/strong>&nbsp;\u6b21\u306b.js\u30e6\u30fc\u30b6\u30fc\u304c\u73fe\u6642\u70b9\u3067\u5fc5\u8981\u3068\u3059\u308b\u30b3\u30fc\u30c9\u306e\u307f\u3092\u81ea\u52d5\u7684\u306b\u8aad\u307f\u8fbc\u3080\u3053\u3068\u3067\u3001\u30da\u30fc\u30b8\u306e\u8aad\u307f\u8fbc\u307f\u901f\u5ea6\u3092\u5411\u4e0a\u3055\u305b\u307e\u3059\u3002<\/li>\n\n\n\n<li>API&nbsp;<strong>\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0:<\/strong>&nbsp;Next .js \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067 API \u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u7c21\u5358\u306b\u4f5c\u6210\u3057\u3066\u3001\u5916\u90e8\u30c7\u30fc\u30bf \u30bd\u30fc\u30b9\u3068\u5bfe\u8a71\u3067\u304d\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u7d44\u307f\u8fbc\u307f\u306eCSS\u30b5\u30dd\u30fc\u30c8:<\/strong>&nbsp;\u6b21\u306b.js \u306f CSS \u3068 Sass \u306e\u7d44\u307f\u8fbc\u307f\u30b5\u30dd\u30fc\u30c8\u3092\u63d0\u4f9b\u3057\u3001\u591a\u304f\u306e\u4e00\u822c\u7684\u306a CSS-in-JS \u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3082\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">\u9069\u7528\u53ef\u80fd\u306a\u30b7\u30ca\u30ea\u30aa<\/h4>\n\n\n\n<p>Next.js\u306f\u3001\u5c0f\u898f\u6a21\u306a\u9759\u7684Web\u30b5\u30a4\u30c8\u304b\u3089\u5927\u898f\u6a21\u306a\u30a8\u30f3\u30bf\u30fc\u30d7\u30e9\u30a4\u30ba\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u307e\u3067\u3001\u3042\u3089\u3086\u308b\u898f\u6a21\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u3002 \u305d\u306e\u5f37\u529b\u306a\u6a5f\u80fd\u3068\u67d4\u8edf\u6027\u306b\u3088\u308a\u3001\u6700\u65b0\u306eWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u69cb\u7bc9\u3059\u308b\u305f\u3081\u306e\u5f37\u529b\u306a\u30c4\u30fc\u30eb\u3067\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u3068\u30a8\u30b3\u30b7\u30b9\u30c6\u30e0<\/h4>\n\n\n\n<p>\u6b21\u306b.js\u305d\u306e\u80cc\u5f8c\u306b\u306f\u5f37\u529b\u306a\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u3068\u8c4a\u5bcc\u306a\u30d7\u30e9\u30b0\u30a4\u30f3\u30a8\u30b3\u30b7\u30b9\u30c6\u30e0\u304c\u3042\u308a\u307e\u3059\u3002 \u521d\u5fc3\u8005\u3067\u3082\u7d4c\u9a13\u8c4a\u5bcc\u306a\u958b\u767a\u8005\u3067\u3082\u3001\u8c4a\u5bcc\u306a\u30ea\u30bd\u30fc\u30b9\u3068\u30b5\u30dd\u30fc\u30c8\u3092\u5229\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8981<\/h3>\n\n\n\n<p>\u6b21\u306b.js React\u958b\u767a\u3092\u3088\u308a\u52b9\u7387\u7684\u3067\u697d\u3057\u3044\u3082\u306e\u306b\u3059\u308b\u5f37\u529b\u306a\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3059\u3002 \u30b5\u30fc\u30d0\u30fc\u5074\u306e\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3068\u9759\u7684\u30b5\u30a4\u30c8\u751f\u6210\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u3001\u9ad8\u901f\u3067\u30b9\u30b1\u30fc\u30e9\u30d6\u30eb\u3067\u4fdd\u5b88\u53ef\u80fd\u306a\u6700\u65b0\u306eWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u69cb\u7bc9\u3059\u308b\u305f\u3081\u306e\u5f37\u529b\u306a\u30c4\u30fc\u30eb\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u7d39\u4ecb\u306f\u3001\u8074\u8846\u306b\u6b21\u306e.js\u306e\u826f\u3044\u6982\u8981\u3092\u63d0\u4f9b\u3057\u3001\u3055\u3089\u306b\u5b66\u3073\u7d9a\u3051\u308b\u3053\u3068\u3078\u306e\u95a2\u5fc3\u3092\u523a\u6fc0\u3059\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/chat.openai.com\/_next\/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAAcHTtdQvKTfcfwR0bXrfLjIN0Vmoln5pVObYXE2hRFieJsISok%3Ds96-c&amp;w=96&amp;q=75\" alt=\"User\"\/><\/figure>\n\n\n\n<p>Next.jsChatGPT\u304c\u5c0e\u5165\u306b\u9078\u3070\u308c\u305f\u7406\u7531\u3092\u8a73\u3057\u304f\u8aac\u660e\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<p>\u3082\u3061\u308d\u3093\u3067\u3059\uff01 \u300c\u306a\u305c\u6b21\u306e.js\u300d\u306f\u3001Next \u306e\u80cc\u5f8c\u306b\u3042\u308b\u4fa1\u5024\u63d0\u6848\u3068.js\u591a\u304f\u306e\u958b\u767a\u30b7\u30ca\u30ea\u30aa\u3067\u63a8\u5968\u3055\u308c\u308b\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u3067\u3042\u308b\u7406\u7531\u3092\u8aac\u660e\u3059\u308b\u91cd\u8981\u306a\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u3059\u3002 \u8003\u3048\u3089\u308c\u308b\u8aac\u660e\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">[\u6b21\u3078] \u3092\u9078\u629e\u3059\u308b\u7406\u7531.js<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">1.&nbsp;<strong>\u30b5\u30fc\u30d0\u30fc\u5074\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0 (SSR)\u3002<\/strong><\/h4>\n\n\n\n<p>\u6b21\u306b.js\u30b5\u30fc\u30d0\u30fc\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u6a5f\u80fd\u306fSEO\u3092\u6539\u5584\u3057\u3001\u691c\u7d22\u30a8\u30f3\u30b8\u30f3\u304cWeb\u30b5\u30a4\u30c8\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u30af\u30ed\u30fc\u30eb\u3057\u3066\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f5c\u6210\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002 \u540c\u6642\u306b\u3001\u30d5\u30a9\u30fc\u30eb\u30c9\u30b9\u30af\u30ea\u30fc\u30f3\u306e\u8aad\u307f\u8fbc\u307f\u901f\u5ea6\u3092\u5411\u4e0a\u3055\u305b\u3001\u30e6\u30fc\u30b6\u30fc\u30a8\u30af\u30b9\u30da\u30ea\u30a8\u30f3\u30b9\u3092\u5411\u4e0a\u3055\u305b\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2.<strong>\u9759\u7684\u30b5\u30a4\u30c8\u751f\u6210(SSG)\u3002<\/strong><\/h4>\n\n\n\n<p>\u6b21\u306b.js\u306e\u9759\u7684\u30d3\u30eb\u30c9\u6a5f\u80fd\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u9ad8\u901f\u3067\u30b9\u30b1\u30fc\u30e9\u30d6\u30eb\u306a\u30b5\u30a4\u30c8\u3092\u69cb\u7bc9\u3067\u304d\u307e\u3059\u3002 \u983b\u7e41\u306b\u5909\u66f4\u3055\u308c\u306a\u3044\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u5834\u5408\u3001\u9759\u7684\u30d3\u30eb\u30c9\u3092\u4f7f\u7528\u3059\u308b\u3068\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u5927\u5e45\u306b\u5411\u4e0a\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3.&nbsp;<strong>\u958b\u767a\u52b9\u7387<\/strong><\/h4>\n\n\n\n<p>\u6b21\u306b.js\u30db\u30c3\u30c8\u30e2\u30b8\u30e5\u30fc\u30eb\u7f6e\u63db\u3001\u81ea\u52d5\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3001\u7d44\u307f\u8fbc\u307fCSS\u30b5\u30dd\u30fc\u30c8\u306a\u3069\u306e\u6a5f\u80fd\u3092\u63d0\u4f9b\u3057\u3001\u3053\u308c\u3089\u3059\u3079\u3066\u304c\u958b\u767a\u306e\u52b9\u7387\u3068\u901f\u5ea6\u306e\u5411\u4e0a\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">4.<strong>\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u6700\u9069\u5316\u3059\u308b<\/strong><\/h4>\n\n\n\n<p>\u81ea\u52d5\u30b3\u30fc\u30c9\u5206\u5272\u3001\u6700\u9069\u5316\u3055\u308c\u305f\u753b\u50cf\u8aad\u307f\u8fbc\u307f\u306a\u3069\u306b\u3088\u308a\u3001\u30a2\u30d7\u30ea\u306e\u5b9f\u884c\u901f\u5ea6\u3068\u30b9\u30e0\u30fc\u30ba\u3055\u304c\u4fdd\u8a3c\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">5<strong>.\u67d4\u8edf\u6027\u3068\u4e92\u63db\u6027<\/strong><\/h4>\n\n\n\n<p>Next.js\u306f\u3001\u591a\u304f\u306e\u4e00\u822c\u7684\u306aNode.js\u30b5\u30fc\u30d0\u30fc\u304a\u3088\u3073\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u4e92\u63db\u6027\u304c\u3042\u308a\u3001\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306eAPI\u304a\u3088\u3073\u30b5\u30fc\u30d3\u30b9\u3068\u30b7\u30fc\u30e0\u30ec\u30b9\u306b\u7d71\u5408\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">6.<strong>\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u306e\u30b5\u30dd\u30fc\u30c8\u3068\u30a8\u30b3\u30b7\u30b9\u30c6\u30e0<\/strong><\/h4>\n\n\n\n<p>Next.js\u306b\u306f\u6d3b\u767a\u306a\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u3068\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u8c4a\u5bcc\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u3042\u308a\u3001\u8c4a\u5bcc\u306a\u30ea\u30bd\u30fc\u30b9\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3001\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3001\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u898b\u3064\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">7<strong>.\u30a8\u30f3\u30bf\u30fc\u30d7\u30e9\u30a4\u30ba\u30b0\u30ec\u30fc\u30c9\u306e\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3<\/strong><\/h4>\n\n\n\n<p>\u305d\u306e\u5b89\u5b9a\u6027\u3068\u30b9\u30b1\u30fc\u30e9\u30d3\u30ea\u30c6\u30a3\u306b\u3088\u308a\u3001\u591a\u304f\u306e\u5927\u4f01\u696d\u306fWeb\u958b\u767a\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3068\u3057\u3066Next.js\u3092\u9078\u629e\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">8.<strong>\u53cd\u5fdc\u3068\u306e\u7dca\u5bc6\u306a\u7d71\u5408<\/strong><\/h4>\n\n\n\n<p>\u3059\u3067\u306bReact\u306b\u7cbe\u901a\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3001React\u306e\u4e0a\u306b\u69cb\u7bc9\u3055\u308c\u3001React\u306e\u6a5f\u80fd\u3092\u62e1\u5f35\u3059\u308b\u305f\u3081\u3001Next.js\u306f\u81ea\u7136\u306a\u9078\u629e\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8981<\/h3>\n\n\n\n<p>[\u6b21\u3078] \u3092\u9078\u629e\u3057\u307e\u3059.js \u958b\u767a\u751f\u7523\u6027\u306e\u5411\u4e0a\u304b\u3089\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u304c\u6700\u9069\u5316\u3055\u308c\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u69cb\u7bc9\u307e\u3067\u3001\u3055\u307e\u3056\u307e\u306a\u7406\u7531\u304b\u3089\u3001Next.js \u306f\u5f37\u529b\u306a\u30c4\u30fc\u30eb\u3068\u67d4\u8edf\u6027\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002 \u500b\u4eba\u306e\u958b\u767a\u8005\u3067\u3082\u5927\u4f01\u696d\u3067\u3082\u3001Next.js\u3055\u307e\u3056\u307e\u306a\u958b\u767a\u30cb\u30fc\u30ba\u3068\u76ee\u6a19\u306b\u5bfe\u5fdc\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u306f\u3001\u8996\u8074\u8005\u304c Next.js \u306e\u5f37\u307f\u3092\u7406\u89e3\u3057\u3001\u3053\u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3092\u63a1\u7528\u3059\u308b\u6b63\u5f53\u306a\u7406\u7531\u3092\u793a\u3059\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/chat.openai.com\/_next\/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAAcHTtdQvKTfcfwR0bXrfLjIN0Vmoln5pVObYXE2hRFieJsISok%3Ds96-c&amp;w=96&amp;q=75\" alt=\"User\"\/><\/figure>\n\n\n\n<p>\u5c0e\u5165ChatGPT\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b7\u30ca\u30ea\u30aa\u3092\u8a73\u3057\u304f\u8aac\u660e\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<p>\u3082\u3061\u308d\u3093\u3067\u3059\uff01 \u6b21\u306e.js\u304c\u9069\u7528\u3055\u308c\u308b\u30b7\u30ca\u30ea\u30aa\u3092\u7406\u89e3\u3059\u308b\u3053\u3068\u306f\u3001\u3053\u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306e\u5e45\u5e83\u3044\u7528\u9014\u3068\u3001\u3055\u307e\u3056\u307e\u306a\u30bf\u30a4\u30d7\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u3069\u306e\u3088\u3046\u306b\u9069\u5fdc\u3067\u304d\u308b\u304b\u3092\u7406\u89e3\u3059\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002 Next.js\u306e\u4e3b\u306a\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u306e\u3044\u304f\u3064\u304b\u3092\u6b21\u306b\u793a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6b21\u3078.js\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b7\u30ca\u30ea\u30aa<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">1<strong>.\u30a8\u30f3\u30bf\u30fc\u30d7\u30e9\u30a4\u30ba\u30b0\u30ec\u30fc\u30c9\u306e\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3068\u30a2\u30d7\u30ea<\/strong><\/h4>\n\n\n\n<p>Next.js\u306e\u30b9\u30b1\u30fc\u30e9\u30d3\u30ea\u30c6\u30a3\u3068\u5b89\u5b9a\u6027\u306b\u3088\u308a\u3001\u8907\u96d1\u3067\u5927\u898f\u6a21\u306a\u30a8\u30f3\u30bf\u30fc\u30d7\u30e9\u30a4\u30ba\u898f\u6a21\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3084Web\u30b5\u30a4\u30c8\u306e\u958b\u767a\u306b\u6700\u9069\u3067\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>2.E\u30b3\u30de\u30fc\u30b9\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0<\/strong><\/h4>\n\n\n\n<p>\u30b5\u30fc\u30d0\u30fc\u5074\u306e\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3068\u9759\u7684\u751f\u6210\u306b\u3088\u308a\u3001Next.js\u306f\u30b7\u30fc\u30e0\u30ec\u30b9\u306a\u30e6\u30fc\u30b6\u30fc\u30b7\u30e7\u30c3\u30d4\u30f3\u30b0\u4f53\u9a13\u3092\u63d0\u4f9b\u3059\u308b\u30ec\u30b9\u30dd\u30f3\u30b7\u30d6\u306ae\u30b3\u30de\u30fc\u30b9Web\u30b5\u30a4\u30c8\u3092\u69cb\u7bc9\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3<strong>.\u30d6\u30ed\u30b0\u3068\u30b3\u30f3\u30c6\u30f3\u30c4\u4e3b\u5c0e\u306eWeb\u30b5\u30a4\u30c8<\/strong><\/h4>\n\n\n\n<p>Next.js\u306e\u9759\u7684\u30b5\u30a4\u30c8\u751f\u6210\u6a5f\u80fd\u306f\u3001\u4e8b\u524d\u306b\u751f\u6210\u3057\u3066\u8aad\u307f\u8fbc\u307f\u901f\u5ea6\u304c\u901f\u3044\u30d6\u30ed\u30b0\u3084\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u591a\u3044Web\u30b5\u30a4\u30c8\u306b\u7279\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">4.<strong>\u52d5\u7684Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3<\/strong><\/h4>\n\n\n\n<p>\u6b21\u306b.js React\u3068\u306e\u7dca\u5bc6\u306a\u7d71\u5408\u306b\u3088\u308a\u3001\u8c4a\u5bcc\u306a\u30a4\u30f3\u30bf\u30e9\u30af\u30b7\u30e7\u30f3\u3092\u5099\u3048\u305f\u6700\u65b0\u306eWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u958b\u767a\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">5.&nbsp;<strong>\u7b2c\u4e09\u8005\u30b5\u30fc\u30d3\u30b9\u306e\u7d71\u5408<\/strong><\/h4>\n\n\n\n<p>Next.js \u306e API \u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u6a5f\u80fd\u3068\u30b5\u30fc\u30d0\u30fc\u5074\u306e\u30c7\u30fc\u30bf \u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u6a5f\u80fd\u306b\u3088\u308a\u3001\u958b\u767a\u8005\u306f\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306e\u30b5\u30fc\u30d3\u30b9\u3084 API \u3068\u7c21\u5358\u306b\u7d71\u5408\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">6<strong>.\u30e2\u30d0\u30a4\u30eb\u304a\u3088\u3073\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u306e\u30af\u30ed\u30b9\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u30a2\u30d7\u30ea<\/strong><\/h4>\n\n\n\n<p>React Native\u306a\u3069\u306e\u30c4\u30fc\u30eb\u3068\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u3001Next.js\u3092\u4f7f\u7528\u3057\u3066\u3001\u30e2\u30d0\u30a4\u30eb\u304a\u3088\u3073\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u306e\u30af\u30ed\u30b9\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u30a2\u30d7\u30ea\u3092\u69cb\u7bc9\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">7<strong>.\u9759\u7684\u306a\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3068\u30e9\u30f3\u30c7\u30a3\u30f3\u30b0\u30da\u30fc\u30b8<\/strong><\/h4>\n\n\n\n<p>\u6b21\u306b.js\u30b7\u30f3\u30d7\u30eb\u3055\u3068\u67d4\u8edf\u6027\u306b\u3088\u308a\u3001\u7279\u306b\u8fc5\u901f\u306b\u53cd\u5fa9\u3057\u3066\u6700\u9069\u5316\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u306b\u3001\u9759\u7684\u306aWeb\u30b5\u30a4\u30c8\u3084\u30e9\u30f3\u30c7\u30a3\u30f3\u30b0\u30da\u30fc\u30b8\u3092\u69cb\u7bc9\u3059\u308b\u305f\u3081\u306e\u52b9\u679c\u7684\u306a\u30c4\u30fc\u30eb\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">8.<strong>\u30aa\u30f3\u30e9\u30a4\u30f3\u5b66\u7fd2\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3068\u30b3\u30df\u30e5\u30cb\u30c6\u30a3<\/strong><\/h4>\n\n\n\n<p>\u30bd\u30fc\u30b7\u30e3\u30eb\u6a5f\u80fd\u3068\u30b3\u30f3\u30c6\u30f3\u30c4\u7ba1\u7406\u6a5f\u80fd\u306b\u3088\u308a\u3001Next.js\u306f\u30aa\u30f3\u30e9\u30a4\u30f3\u5b66\u7fd2\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3084\u30b3\u30df\u30e5\u30cb\u30c6\u30a3Web\u30b5\u30a4\u30c8\u306e\u69cb\u7bc9\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8981<\/h3>\n\n\n\n<p>\u6b21\u306b.js\u306e\u6c4e\u7528\u6027\u3068\u67d4\u8edf\u6027\u306b\u3088\u308a\u3001\u3042\u3089\u3086\u308b\u30bf\u30a4\u30d7\u3068\u30b5\u30a4\u30ba\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u3002 \u500b\u4eba\u306e\u30d6\u30ed\u30b0\u304b\u3089\u5927\u898f\u6a21\u306ae\u30b3\u30de\u30fc\u30b9\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u307e\u3067\u3001\u9759\u7684\u306a\u30e9\u30f3\u30c7\u30a3\u30f3\u30b0\u30da\u30fc\u30b8\u304b\u3089\u8907\u96d1\u306a\u30a8\u30f3\u30bf\u30fc\u30d7\u30e9\u30a4\u30ba\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u307e\u3067\u3001Next.js\u306f\u512a\u308c\u305f\u30b5\u30dd\u30fc\u30c8\u3068\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u308c\u3089\u306e\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u3092\u8aac\u660e\u3059\u308b\u3053\u3068\u3067\u3001\u8996\u8074\u8005\u306fNext\u306e\u5e45\u5e83\u3044\u9069\u7528\u6027\u3092\u3088\u308a\u3088\u304f\u7406\u89e3\u3057.js Next.js\u3092\u72ec\u81ea\u306b\u4f7f\u7528\u3059\u308b\u3088\u308a\u5275\u9020\u7684\u306a\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u63a2\u6c42\u3057\u3066\u5b9f\u88c5\u3059\u308b\u3088\u3046\u306b\u4fc3\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/chat.openai.com\/_next\/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAAcHTtdQvKTfcfwR0bXrfLjIN0Vmoln5pVObYXE2hRFieJsISok%3Ds96-c&amp;w=96&amp;q=75\" alt=\"User\"\/><\/figure>\n\n\n\n<p>ChatGPT\u3092\u8d77\u52d5\u3059\u308b\u524d\u306b\u3001\u958b\u767a\u74b0\u5883\u306e\u8a2d\u5b9a\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<p>\u3082\u3061\u308d\u3093\u3067\u3059\uff01 Next .js \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u4f5c\u6210\u3092\u958b\u59cb\u3059\u308b\u524d\u306b\u3001\u958b\u767a\u74b0\u5883\u304c\u9069\u5207\u306b\u69cb\u6210\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u3053\u3067\u306f\u3001\u6b21\u306e .js \u958b\u767a\u74b0\u5883\u306b\u5411\u3051\u3066\u6e96\u5099\u3059\u308b\u306e\u306b\u5f79\u7acb\u3064\u91cd\u8981\u306a\u624b\u9806\u3068\u624b\u9806\u3092\u3044\u304f\u3064\u304b\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u59cb\u3081\u308b\u524d\u306b: \u958b\u767a\u74b0\u5883\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">1.&nbsp;<strong>\u30ce\u30fc\u30c9 .js\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/strong><\/h4>\n\n\n\n<p>\u6b21\u306b.js\u30e9\u30f3\u30bf\u30a4\u30e0\u74b0\u5883\u3068\u3057\u3066\u30ce\u30fc\u30c9.js\u304c\u5fc5\u8981\u3067\u3059\u3002 \u304a\u4f7f\u3044\u306e\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u306b\u9069\u3057\u305f\u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u3001<a href=\"https:\/\/nodejs.org\/\">Node .js\u306e\u516c\u5f0f<\/a>Web\u30b5\u30a4\u30c8\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002 \u5b89\u5b9a\u6027\u3092\u78ba\u4fdd\u3059\u308b\u305f\u3081\u306b\u3001LTS(\u9577\u671f\u30b5\u30dd\u30fc\u30c8)\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>2.npm\u307e\u305f\u306f\u7cf8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059<\/strong><\/h4>\n\n\n\n<p>\u4e00\u822c\u306b\u3001npm(\u30ce\u30fc\u30c9\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u30fc)\u306f\u3001\u30ce\u30fc\u30c9.js\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u306b\u81ea\u52d5\u7684\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059\u3002 Yarn\u3092\u4f7f\u7528\u3057\u305f\u3044\u5834\u5408\u306f\u3001<a href=\"https:\/\/yarnpkg.com\/\">Yarn\u306e\u516c\u5f0fWeb\u30b5\u30a4\u30c8\u306e\u6307\u793a\u306b\u5f93\u3063\u3066<\/a>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3.<strong>\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u3092\u8a2d\u5b9a\u3057\u307e\u3059<\/strong><\/h4>\n\n\n\n<p>Visual Studio Code\u3001Sublime Text\u3001Atom \u306a\u3069\u306e\u304a\u6c17\u306b\u5165\u308a\u306e\u30c6\u30ad\u30b9\u30c8 \u30a8\u30c7\u30a3\u30bf\u30fc\u3092\u9078\u629e\u3067\u304d\u307e\u3059\u3002 \u591a\u304f\u306e\u30a8\u30c7\u30a3\u30bf\u30fc\u306b\u306f\u3001\u958b\u767a\u52b9\u7387\u306e\u5411\u4e0a\u306b\u5f79\u7acb\u3064 React \u3068 Next \u306e\u62e1\u5f35\u6a5f\u80fd\u304c\u3042\u308a\u307e\u3059.js\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">4.&nbsp;<strong>Next.js CLI \u3092\u30b0\u30ed\u30fc\u30d0\u30eb\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059(\u30aa\u30d7\u30b7\u30e7\u30f3)\u3002<\/strong><\/h4>\n\n\n\n<p>Next.js\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30c4\u30fc\u30eb\u3092\u30b0\u30ed\u30fc\u30d0\u30eb\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u306b\u306f\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30d0\u30c3\u30b7\u30e5\u30b3\u30d4\u30fc\u30b3\u30fc\u30c9<\/p>\n\n\n\n<p><code>npm install -g create-next-app<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">5.&nbsp;<strong>\u65b0\u3057\u3044\u6b21.js\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b<\/strong><\/h4>\n\n\n\n<p>[\u6b21\u3078.js CLI \u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u65b0\u3057\u3044\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u3059\u3070\u3084\u304f\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30d0\u30c3\u30b7\u30e5\u30b3\u30d4\u30fc\u30b3\u30fc\u30c9<\/p>\n\n\n\n<p><code>npx create-next-app my-nextjs-app<\/code><\/p>\n\n\n\n<p>\u307e\u305f\u306f\u3001CLI \u3092\u30b0\u30ed\u30fc\u30d0\u30eb\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u5834\u5408\u306f\u3001\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30d0\u30c3\u30b7\u30e5\u30b3\u30d4\u30fc\u30b3\u30fc\u30c9<\/p>\n\n\n\n<p><code>create-next-app my-nextjs-app<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">6.&nbsp;<strong>\u958b\u767a\u30b5\u30fc\u30d0\u30fc\u306e\u8d77\u52d5<\/strong><\/h4>\n\n\n\n<p>\u65b0\u3057\u304f\u4f5c\u6210\u3057\u305f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8 \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u958b\u767a\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30d0\u30c3\u30b7\u30e5\u30b3\u30d4\u30fc\u30b3\u30fc\u30c9<\/p>\n\n\n\n<p><code>cd my-nextjs-app npm run dev<\/code><\/p>\n\n\n\n<p>\u3053\u308c\u306b\u3088\u308a\u3001\u958b\u767a\u30b5\u30fc\u30d0\u30fc\u304c\u30ed\u30fc\u30ab\u30eb\u3067\u8d77\u52d5\u3057\u3001\u30d6\u30e9\u30a6\u30b6\u30fc\u3067\u30a2\u30af\u30bb\u30b9\u3057\u3066 Next .js \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u8868\u793a\u3067\u304d\u307e\u3059\u3002<code>http:\/\/localhost:3000<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8981<\/h3>\n\n\n\n<p>\u958b\u767a\u74b0\u5883\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306f\u3001\u6b21\u306e.js\u958b\u767a\u3092\u958b\u59cb\u3059\u308b\u524d\u306b\u91cd\u8981\u306a\u624b\u9806\u3067\u3059\u3002 Node.js\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u3001\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u30fc\u3092\u9069\u5207\u306b\u69cb\u6210\u3057\u3001Next.js\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u4f5c\u6210\u65b9\u6cd5\u3068\u5b9f\u884c\u65b9\u6cd5\u306b\u7cbe\u901a\u3059\u308b\u3053\u3068\u3067\u3001\u30aa\u30fc\u30c7\u30a3\u30a8\u30f3\u30b9\u306fNext .js\u958b\u767a\u306e\u65c5\u3092\u59cb\u3081\u308b\u6e96\u5099\u304c\u6574\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u306f\u3001\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u5b9f\u8df5\u7684\u306a\u90e8\u5206\u3067\u3042\u308a\u3001\u5404\u624b\u9806\u306e\u5b9f\u884c\u65b9\u6cd5\u3092\u793a\u3057\u3066\u3001\u8074\u8846\u304c\u3088\u308a\u3088\u304f\u7406\u89e3\u3057\u3066\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/chat.openai.com\/_next\/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAAcHTtdQvKTfcfwR0bXrfLjIN0Vmoln5pVObYXE2hRFieJsISok%3Ds96-c&amp;w=96&amp;q=75\" alt=\"User\"\/><\/figure>\n\n\n\n<p>\u59cb\u3081\u308b\u524d\u306b\u3001\u30ce\u30fc\u30c9.js\u3068npm\u7528\u306eChatGPT\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<p>\u3082\u3061\u308d\u3093\u3067\u3059\uff01 Node.js \u3068 npm \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u3001Next.js \u306e\u4f7f\u7528\u3092\u958b\u59cb\u3059\u308b\u524d\u306e\u91cd\u8981\u306a\u30b9\u30c6\u30c3\u30d7\u3067\u3059\u3002 \u4ee5\u4e0b\u306f\u3001\u8a73\u7d30\u306a\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30ac\u30a4\u30c9\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u59cb\u3081\u308b\u524d\u306b: \u30ce\u30fc\u30c9.js\u3068 npm \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u30ce\u30fc\u30c9.js\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/strong><\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u516c\u5f0f<a href=\"https:\/\/nodejs.org\/\">\u306eNode<\/a>&nbsp;.js.js\u306e\u516c\u5f0fWeb\u30b5\u30a4\u30c8\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068<strong>\u3001<\/strong>\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u306b\u63a8\u5968\u3055\u308c\u308b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u9078\u629e<\/strong>&nbsp;Node .js\u306b\u306f\u3044\u304f\u3064\u304b\u306e\u30a8\u30c7\u30a3\u30b7\u30e7\u30f3\u304c\u3042\u308a\u3001\u901a\u5e38\u306fLTS(\u9577\u671f\u30b5\u30dd\u30fc\u30c8)\u30ea\u30ea\u30fc\u30b9\u3068\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002 \u307b\u3068\u3093\u3069\u306e\u30e6\u30fc\u30b6\u30fc\u306b\u3068\u3063\u3066\u3001LTS\u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u6700\u3082\u5b89\u5b9a\u3057\u305f\u63a8\u5968\u3055\u308c\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3059\u3002<\/li>\n\n\n\n<li>\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9 \u9078\u629e\u3057\u305f\u30d0\u30fc\u30b8\u30e7\u30f3\u306e [\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9] \u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001<strong>\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9<\/strong>\u3092\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306e\u5b9f\u884c<\/strong>&nbsp;\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u30d5\u30a1\u30a4\u30eb\u3092\u63a2\u3057\u3001\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3057\u3066\u5b9f\u884c\u3057\u307e\u3059\u3002 \u753b\u9762\u306e\u6307\u793a\u306b\u5f93\u3044\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u78ba\u8a8d\u3059\u308b \u30bf\u30fc\u30df\u30ca\u30eb\u307e\u305f\u306f\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u958b\u304d\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 \u30d0\u30c3\u30b7\u30e5\u30b3\u30d4\u30fc\u30b3\u30fc\u30c9 \u30ce\u30fc\u30c9.js\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u6210\u529f\u3057\u305f\u5834\u5408\u3001\u30b3\u30de\u30f3\u30c9\u306f<strong>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/strong>\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u756a\u53f7\u3092\u8fd4\u3057\u307e\u3059\u3002<code>node -v<\/code><\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>npm\u3092\u78ba\u8a8d\u307e\u305f\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/strong><\/h4>\n\n\n\n<p>\u901a\u5e38\u3001Node.js\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u3001npm(\u30ce\u30fc\u30c9\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u30fc)\u3082\u81ea\u52d5\u7684\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059\u3002 npm \u304c\u6b63\u5e38\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f\u3053\u3068\u3092\u78ba\u8a8d\u3059\u308b\u306b\u306f\u3001\u6b21\u306e\u624b\u9806\u306b\u5f93\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>npm \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3059\u308b \u30bf\u30fc\u30df\u30ca\u30eb\u307e\u305f\u306f\u30b3\u30de\u30f3\u30c9 \u30d7\u30ed\u30f3\u30d7\u30c8\u3067\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 bashCopy \u30b3\u30fc\u30c9&nbsp;<strong>npm<\/strong>&nbsp;\u304c\u65e2\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u30b3\u30de\u30f3\u30c9\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u30d0\u30fc\u30b8\u30e7\u30f3\u756a\u53f7\u3092\u8fd4\u3057\u307e\u3059\u3002<code>npm -v<\/code><\/li>\n\n\n\n<li><strong>(\u7701\u7565\u53ef\u80fd)<\/strong>&nbsp;npm \u3092\u500b\u5225\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b \u4e0a\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u304c\u30d0\u30fc\u30b8\u30e7\u30f3\u756a\u53f7\u3092\u8fd4\u3055\u306a\u3044\u5834\u5408\u3001\u307e\u305f\u306f\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u306f\u3001npm \u3092\u500b\u5225\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u30bf\u30fc\u30df\u30ca\u30eb\u307e\u305f\u306f\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3067\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<code>npm install npm -g<\/code><\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8981<\/h3>\n\n\n\n<p>Node.js \u3068 npm \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u306f\u3001Next.js \u306e\u4f7f\u7528\u3092\u958b\u59cb\u3059\u308b\u524d\u306e\u91cd\u8981\u306a\u624b\u9806\u3067\u3059\u3002 \u3053\u308c\u3089 2 \u3064\u306e\u30c4\u30fc\u30eb\u306f\u3001Next.js \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u958b\u767a\u3001\u69cb\u7bc9\u3001\u304a\u3088\u3073\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e\u57fa\u76e4\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002 \u9069\u5207\u306a\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u691c\u8a3c\u306b\u3088\u308a\u3001\u958b\u767a\u74b0\u5883\u304c\u6b21\u306e.js\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u958b\u59cb\u3059\u308b\u6e96\u5099\u304c\u3067\u304d\u3066\u3044\u308b\u3053\u3068\u304c\u4fdd\u8a3c\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30d3\u30c7\u30aa\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u3053\u308c\u3089\u306e\u624b\u9806\u3092\u5b9f\u969b\u306b\u30c7\u30e2\u30f3\u30b9\u30c8\u30ec\u30fc\u30b7\u30e7\u30f3\u3057\u3066\u3001\u8996\u8074\u8005\u304c\u7406\u89e3\u3057\u3066\u7406\u89e3\u3057\u3084\u3059\u304f\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u3053\u308c\u306f\u3001Node.js \u3068 npm \u306e\u521d\u5fc3\u8005\u306b\u3068\u3063\u3066\u7279\u306b\u4fbf\u5229\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/chat.openai.com\/_next\/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAAcHTtdQvKTfcfwR0bXrfLjIN0Vmoln5pVObYXE2hRFieJsISok%3Ds96-c&amp;w=96&amp;q=75\" alt=\"User\"\/><\/figure>\n\n\n\n<p>\u6700\u521d\u306e\u30cd\u30af\u30b9\u30c8.js\u30d7\u30ed\u30b8\u30a7\u30af\u30c8ChatGPT\u306e\u4f5c\u6210\u3092\u958b\u59cb\u3059\u308b\u524d\u306b\u3001\u8a73\u7d30\u306b\u8aac\u660e\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<p>\u3082\u3061\u308d\u3093\u3001\u6700\u521d\u306e Next.js \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u306f\u3001\u30a8\u30ad\u30b5\u30a4\u30c6\u30a3\u30f3\u30b0\u306a\u6642\u671f\u3067\u3042\u308a\u3001\u5b9f\u969b\u306e\u958b\u767a\u30d5\u30a7\u30fc\u30ba\u3078\u306e\u91cd\u8981\u306a\u30b9\u30c6\u30c3\u30d7\u3067\u3059\u3002 \u30d3\u30c7\u30aa\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u512a\u308c\u305f\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u3092\u63d0\u4f9b\u3059\u308b\u6700\u521d\u306eNext.js\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306e\u8a73\u7d30\u306a\u624b\u9806\u3068\u624b\u9806\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u59cb\u3081\u308b\u524d\u306b: \u6700\u521d\u306e\u6b21.js\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">1.<strong>\u30bf\u30fc\u30df\u30ca\u30eb\u307e\u305f\u306f\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u958b\u304d\u307e\u3059<\/strong><\/h4>\n\n\n\n<p>\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u3067\u30bf\u30fc\u30df\u30ca\u30eb(Mac \/ Linux)\u307e\u305f\u306f\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8(Windows)\u3092\u898b\u3064\u3051\u3066\u958b\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2.&nbsp;<strong>\u4f5c\u696d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u9078\u629e\u3059\u308b<\/strong><\/h4>\n\n\n\n<p>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4fdd\u6301\u3059\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u307e\u3059\u3002 \u305f\u3068\u3048\u3070\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u306b\u79fb\u52d5\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30d0\u30c3\u30b7\u30e5\u30b3\u30d4\u30fc\u30b3\u30fc\u30c9<\/p>\n\n\n\n<p><code>cd ~\/Desktop<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3.&nbsp;<strong>\u300c\u6b21\u3092\u4f5c\u6210\u300d\u30a2\u30d7\u30ea\u3092\u4f7f\u7528\u3057\u3066\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b<\/strong><\/h4>\n\n\n\n<p>\u6b21\u306b.js\u65b0\u3057\u3044\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u3059\u3070\u3084\u304f\u4f5c\u6210\u3059\u308b\u305f\u3081\u306e\u300c\u6b21\u306e\u30a2\u30d7\u30ea\u306e\u4f5c\u6210\u300d\u3068\u547c\u3070\u308c\u308b\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u30c4\u30fc\u30eb\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002 \u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u3001\u9078\u629e\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b &#8220;my-nextjs-app&#8221; \u3068\u3044\u3046\u540d\u524d\u306e\u65b0\u3057\u3044\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30d0\u30c3\u30b7\u30e5\u30b3\u30d4\u30fc\u30b3\u30fc\u30c9<\/p>\n\n\n\n<p><code>npx create-next-app my-nextjs-app<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">4.&nbsp;<strong>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u307e\u3059<\/strong><\/h4>\n\n\n\n<p>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u4f5c\u6210\u3055\u308c\u305f\u3089\u3001\u65b0\u3057\u3044\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30d0\u30c3\u30b7\u30e5\u30b3\u30d4\u30fc\u30b3\u30fc\u30c9<\/p>\n\n\n\n<p><code>cd my-nextjs-app<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">5.&nbsp;<strong>\u958b\u767a\u30b5\u30fc\u30d0\u30fc\u306e\u8d77\u52d5<\/strong><\/h4>\n\n\n\n<p>\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u3001\u958b\u767a\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30d0\u30c3\u30b7\u30e5\u30b3\u30d4\u30fc\u30b3\u30fc\u30c9<\/p>\n\n\n\n<p><code>npm run dev<\/code><\/p>\n\n\n\n<p>\u3053\u306e\u30b3\u30de\u30f3\u30c9\u306f\u3001\u30ed\u30fc\u30ab\u30eb\u958b\u767a\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3057\u3001\u30b3\u30fc\u30c9\u306b\u52a0\u3048\u305f\u5909\u66f4\u3092\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u3067\u53cd\u6620\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">6.&nbsp;<strong>\u30a2\u30d7\u30ea\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b<\/strong><\/h4>\n\n\n\n<p>\u30d6\u30e9\u30a6\u30b6\u30fc\u306b\u79fb\u52d5\u3059\u308b\u3068\u3001\u65b0\u3057\u304f\u4f5c\u6210\u3055\u308c\u305f Next.js \u30a2\u30d7\u30ea\u306e\u30a6\u30a7\u30eb\u30ab\u30e0 \u30da\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<code>http:\/\/localhost:3000<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">7.&nbsp;<strong>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u69cb\u9020\u3092\u8abf\u3079\u308b<\/strong><\/h4>\n\n\n\n<p>\u4efb\u610f\u306e\u30b3\u30fc\u30c9 \u30a8\u30c7\u30a3\u30bf\u30fc (Visual Studio Code \u306a\u3069) \u3092\u958b\u304d\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8 \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u53c2\u7167\u3057\u307e\u3059\u3002 \u30da\u30fc\u30b8\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3001\u5171\u901a\u30d5\u30a1\u30a4\u30eb\u306a\u3069\u3001Next.js \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30b3\u30a2\u90e8\u5206\u3067\u3042\u308b\u3044\u304f\u3064\u304b\u306e\u30d5\u30a1\u30a4\u30eb\u3068\u30d5\u30a9\u30eb\u30c0\u30fc\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8981<\/h3>\n\n\n\n<p>\u4e0a\u8a18\u306e\u624b\u9806\u3067\u3001\u6700\u521d\u306e Next .js \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u6b63\u5e38\u306b\u4f5c\u6210\u3055\u308c\u3001\u30ed\u30fc\u30ab\u30eb\u958b\u767a\u30b5\u30fc\u30d0\u30fc\u304c\u8d77\u52d5\u3057\u307e\u3057\u305f\u3002 \u3053\u306e\u6642\u70b9\u3067\u3001\u30da\u30fc\u30b8\u3084\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u958b\u767a\u3092\u958b\u59cb\u3057\u3001\u6b21\u306e.js\u306e\u529b\u3092\u8abf\u3079\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u30d3\u30c7\u30aa\u3067\u306f\u3001\u3053\u308c\u3089\u306e\u624b\u9806\u3092\u8aac\u660e\u3057\u3001\u5404\u30b3\u30de\u30f3\u30c9\u306e\u6a5f\u80fd\u3092\u8aac\u660e\u3057\u3001\u5834\u5408\u306b\u3088\u3063\u3066\u306f\u3044\u304f\u3064\u304b\u306e\u4e00\u822c\u7684\u306a\u554f\u984c\u3068\u89e3\u6c7a\u7b56\u3092\u793a\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u3053\u308c\u306f\u3001\u8996\u8074\u8005\u304cNext.js\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u69cb\u9020\u3092\u7406\u89e3\u3057\u3001\u3055\u3089\u306a\u308b\u5b66\u7fd2\u3068\u958b\u767a\u306e\u6e96\u5099\u3092\u3059\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/chat.openai.com\/_next\/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAAcHTtdQvKTfcfwR0bXrfLjIN0Vmoln5pVObYXE2hRFieJsISok%3Ds96-c&amp;w=96&amp;q=75\" alt=\"User\"\/><\/figure>\n\n\n\n<p>ChatGPT\u3078\u306e\u30da\u30fc\u30b8\u3068\u30eb\u30fc\u30c8\u306e\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u57fa\u672c\u7684\u306a\u64cd\u4f5c\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<p>\u3082\u3061\u308d\u3093\u3067\u3059\uff01 Next.js\u306e\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u306b\u3088\u308a\u3001\u30da\u30fc\u30b8\u306e\u4f5c\u6210\u3068\u7ba1\u7406\u304c\u975e\u5e38\u306b\u30b7\u30f3\u30d7\u30eb\u3067\u76f4\u611f\u7684\u306b\u306a\u308a\u307e\u3059\u3002 \u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u30d3\u30c7\u30aa\u3067\u4f7f\u7528\u3067\u304d\u308b\u30da\u30fc\u30b8\u3068\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u57fa\u672c\u7684\u306a\u64cd\u4f5c\u306e\u8a73\u7d30\u306a\u8aac\u660e\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30da\u30fc\u30b8\u3068\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0: \u57fa\u672c\u64cd\u4f5c<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>1. \u30da\u30fc\u30b8\u3092\u4f5c\u6210\u3059\u308b<\/strong><\/h4>\n\n\n\n<p>\u6b21\u306e.js\u3067\u306f\u3001\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306e\u5404\u30d5\u30a1\u30a4\u30eb\u304c\u81ea\u52d5\u7684\u306b\u30a2\u30af\u30bb\u30b9\u53ef\u80fd\u306a\u30eb\u30fc\u30c8\u306b\u306a\u308a\u307e\u3059\u3002 \u305f\u3068\u3048\u3070\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u30d1\u30b9\u3092\u4ecb\u3057\u3066\u3053\u306e\u30da\u30fc\u30b8\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u540d\u524d\u306e\u4ed8\u3044\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<code>pages<\/code><code>about.js<\/code><code>pages<\/code><code>\/about<\/code><\/p>\n\n\n\n<p>jsxCopy code<\/p>\n\n\n\n<p><code>\/\/ pages\/about.js function About() { return &lt;div&gt;About us&lt;\/div&gt;; } export default About;<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>2. \u52d5\u7684\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0<\/strong><\/h4>\n\n\n\n<p>\u52d5\u7684\u30eb\u30fc\u30c8\u306f\u30d5\u30a1\u30a4\u30eb\u540d\u3067\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002 \u305f\u3068\u3048\u3070\u3001\u4efb\u610f\u306e ID \u3092\u53d6\u5f97\u3059\u308b \u3068\u3044\u3046\u540d\u524d\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3001\u305d\u306e ID \u3092\u30da\u30fc\u30b8\u3067\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<code>[id].js<\/code><\/p>\n\n\n\n<p>jsxCopy code<\/p>\n\n\n\n<p><code>\/\/ pages\/posts\/[id].js import { useRouter } from 'next\/router'; function Post() { const router = useRouter(); const { id } = router.query; return &lt;div&gt;Post: {id}&lt;\/div&gt;; } export default Post;<\/code><\/p>\n\n\n\n<p>\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u300c\u6295\u7a3f:123\u300d\u3068\u8868\u793a\u3055\u308c\u307e\u3059\u3002<code>\/posts\/123<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>3. \u30cd\u30b9\u30c8\u3055\u308c\u305f\u30eb\u30fc\u30c8<\/strong><\/h4>\n\n\n\n<p>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u4e0b\u306b\u3001\u30cd\u30b9\u30c8\u3055\u308c\u305f\u30eb\u30fc\u30c8\u3092\u8868\u3059\u30d5\u30a9\u30eb\u30c0\u30fc\u3092\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002 \u305f\u3068\u3048\u3070\u3001\u30d1\u30b9\u306b\u30de\u30c3\u30d7\u3057\u307e\u3059\u3002<code>pages<\/code><code>pages\/blog\/first-post.js<\/code><code>\/blog\/first-post<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>4. \u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u30ea\u30f3\u30af<\/strong><\/h4>\n\n\n\n<p>\u6b21\u306b.js \u306f\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8 \u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3\u306b\u4f7f\u7528\u3067\u304d\u308b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002 Link \u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3001\u30da\u30fc\u30b8\u9593\u306e\u66f4\u65b0\u30b8\u30e3\u30f3\u30d7\u3092\u3057\u306a\u3044\u3088\u3046\u306b\u3057\u307e\u3059\u3002<code>Link<\/code><\/p>\n\n\n\n<p>jsxCopy code<\/p>\n\n\n\n<p><code>import Link from 'next\/link'; function Navigation() { return ( &lt;nav&gt; &lt;Link href=\"\/about\"&gt;About&lt;\/Link&gt; &lt;Link href=\"\/contact\"&gt;Contact&lt;\/Link&gt; &lt;\/nav&gt; ); }<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>5.404\u30da\u30fc\u30b8\u306e\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3068\u30ab\u30b9\u30bf\u30de\u30a4\u30ba<\/strong><\/h4>\n\n\n\n<p>API \u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3092\u4f7f\u7528\u3057\u3066\u30b5\u30fc\u30d0\u30fc\u5074\u306e\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3092\u5b9f\u88c5\u3059\u308b\u304b\u3001\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u4e0b\u306b \u3068\u3044\u3046\u540d\u524d\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066 404 \u30da\u30fc\u30b8\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3067\u304d\u307e\u3059\u3002<code>pages<\/code><code>404.js<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>6. getStaticPathways and getStaticProps<\/strong><\/h4>\n\n\n\n<p>\u4e8b\u524d\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u304c\u5fc5\u8981\u306a\u52d5\u7684\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u5834\u5408\u3001Next.js \u306b\u306f\u9759\u7684\u30da\u30fc\u30b8\u3092\u751f\u6210\u3059\u308b\u30a2\u30f3\u30d1\u30b5\u30f3\u30c9\u95a2\u6570\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002<code>getStaticPaths<\/code><code>getStaticProps<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8981<\/h3>\n\n\n\n<p>\u6b21\u306b.js\u306e\u30da\u30fc\u30b8\u3068\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u306f\u3001\u6700\u65b0\u306eWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u3059\u3079\u3066\u306e\u6a5f\u80fd\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002 \u30b7\u30f3\u30d7\u30eb\u306a\u30d5\u30a1\u30a4\u30eb\u3068\u30d5\u30a9\u30eb\u30c0\u69cb\u9020\u306b\u3088\u308a\u3001\u8907\u96d1\u306a\u8a2d\u5b9a\u3092\u5fc5\u8981\u3068\u305b\u305a\u306b\u30eb\u30fc\u30c8\u3092\u7c21\u5358\u306b\u5b9a\u7fa9\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30d3\u30c7\u30aa\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u30da\u30fc\u30b8\u306e\u4f5c\u6210\u3068\u7ba1\u7406\u65b9\u6cd5\u3001\u52d5\u7684\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3068\u30cd\u30b9\u30c8\u3055\u308c\u305f\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u4f7f\u7528\u65b9\u6cd5\u3001Next.js\u306e\u4ed6\u306e\u9ad8\u5ea6\u306a\u6a5f\u80fd\u3092\u5229\u7528\u3059\u308b\u65b9\u6cd5\u3092\u8996\u8074\u8005\u306b\u793a\u3059\u5b9f\u7528\u7684\u306a\u4f8b\u3092\u4f7f\u7528\u3057\u3066\u3001\u3053\u308c\u3089\u306e\u6982\u5ff5\u3092\u793a\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u3053\u308c\u306b\u3088\u308a\u3001\u8996\u8074\u8005\u306fNext.js\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3068\u30da\u30fc\u30b8\u7ba1\u7406\u3092\u3059\u3070\u3084\u304f\u7406\u89e3\u3059\u308b\u306e\u306b\u5f79\u7acb\u3064\u5f37\u56fa\u306a\u57fa\u76e4\u3092\u5f97\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/chat.openai.com\/_next\/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAAcHTtdQvKTfcfwR0bXrfLjIN0Vmoln5pVObYXE2hRFieJsISok%3Ds96-c&amp;w=96&amp;q=75\" alt=\"User\"\/><\/figure>\n\n\n\n<p>ChatGPT\u3078\u306e\u30da\u30fc\u30b8\u3068\u30eb\u30fc\u30c8\u306e\u4f5c\u6210\u3068\u69cb\u6210\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<p>\u3082\u3061\u308d\u3093\u3067\u3059\uff01 \u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb \u30b3\u30f3\u30c6\u30f3\u30c4\u3068\u3057\u3066\u4f7f\u7528\u3067\u304d\u308b\u30da\u30fc\u30b8\u3092\u6b21\u306e.js\u3067\u4f5c\u6210\u304a\u3088\u3073\u6574\u7406\u3059\u308b\u65b9\u6cd5\u306e\u8a73\u7d30\u306a\u8aac\u660e\u3092\u6b21\u306b\u793a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30da\u30fc\u30b8\u3068\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0: \u30da\u30fc\u30b8\u306e\u4f5c\u6210\u3068\u6574\u7406<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>1. \u30da\u30fc\u30b8\u4f5c\u6210<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u30d5\u30e9\u30c3\u30c8\u30da\u30fc\u30b8<\/strong>:\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u4e0b\u3067\u3001\u5404React\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u30d5\u30a1\u30a4\u30eb\u306f\u30a2\u30af\u30bb\u30b9\u53ef\u80fd\u306a\u30eb\u30fc\u30c8\u306b\u306a\u308a\u307e\u3059\u3002 \u305f\u3068\u3048\u3070\u3001\u9023\u7d61\u5148\u30da\u30fc\u30b8\u3068\u3044\u3046\u540d\u524d\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002 jsxCopy \u30b3\u30fc\u30c9\u30e6\u30fc\u30b6\u30fc\u306f\u3001\u30d1\u30b9\u3092\u4ecb\u3057\u3066\u3053\u306e\u30da\u30fc\u30b8\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002<code>pages<\/code><code>contact.js<\/code><code>\/\/ pages\/contact.js function Contact() { return &lt;div&gt;Contact Us&lt;\/div&gt;; } export default Contact;&nbsp;<\/code><code>\/contact<\/code><\/li>\n\n\n\n<li><strong>\u52d5\u7684\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0<\/strong>: \u89d2\u62ec\u5f27\u3092\u542b\u3080\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\u3068\u3001\u52d5\u7684\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3092\u30ad\u30e3\u30d7\u30c1\u30e3\u3067\u304d\u307e\u3059\u3002 jsxCopy \u30b3\u30fc\u30c9\u30a2\u30af\u30bb\u30b9\u3067\u306f\u3001\u300cJohn \u306e\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u300d\u3068\u8868\u793a\u3055\u308c\u307e\u3059\u3002<code>[username].js<\/code><code>\/\/ pages\/user\/[username].js import { useRouter } from 'next\/router'; function UserProfile() { const router = useRouter(); return &lt;div&gt;{router.query.username}'s Profile&lt;\/div&gt;; } export default UserProfile;&nbsp;<\/code><code>\/user\/john<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>2.\u30da\u30fc\u30b8\u306e\u69cb\u6210<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u57fa\u672c\u69cb\u9020<\/strong>: \u6b21\u306b.js\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u4e0b\u306b\u30da\u30fc\u30b8\u3092\u6574\u7406\u3059\u308b\u3053\u3068\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002 \u3053\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u69cb\u9020\u306f\u3001URL\u306b\u76f4\u63a5\u53cd\u6620\u3055\u308c\u307e\u3059\u3002<code>pages<\/code><\/li>\n\n\n\n<li><strong>\u30cd\u30b9\u30c8\u3055\u308c\u305f\u30eb\u30fc\u30c8<\/strong>: \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u4e0b\u306b\u30d5\u30a9\u30eb\u30c0\u30fc\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u3067\u3001\u30cd\u30b9\u30c8\u3055\u308c\u305f\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u69cb\u9020\u3092\u8868\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u305f\u3068\u3048\u3070\u3001\u30d1\u30b9\u306b\u30de\u30c3\u30d7\u3057\u307e\u3059\u3002<code>pages<\/code><code>pages\/blog\/first-post.js<\/code><code>\/blog\/first-post<\/code><\/li>\n\n\n\n<li>API&nbsp;<strong>\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0<\/strong>: API \u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u4f5c\u6210\u3059\u308b\u5834\u5408\u306f\u3001\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u8ffd\u52a0\u3067\u304d\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u5b9f\u969b\u306e\u30da\u30fc\u30b8\u3068\u3057\u3066\u3067\u306f\u306a\u304f\u3001API \u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3068\u3057\u3066\u51e6\u7406\u3055\u308c\u307e\u3059\u3002<code>pages\/api<\/code><\/li>\n\n\n\n<li><strong>\u5171\u6709<\/strong>\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8: \u8907\u6570\u306e\u30da\u30fc\u30b8\u3067\u5171\u6709\u3055\u308c\u308b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u5834\u5408\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30eb\u30fc\u30c8\u306e\u4e0b\u306b\u5225\u306e\u30d5\u30a9\u30eb\u30c0\u30fc\u3092\u4f5c\u6210\u3057\u3001\u305d\u3053\u3067\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u6574\u7406\u3067\u304d\u307e\u3059\u3002<code>components<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>3. 404\u30da\u30fc\u30b8\u3068500\u30da\u30fc\u30b8<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30ab\u30b9\u30bf\u30e0 404 \u30da\u30fc\u30b8: \u30ab\u30b9\u30bf\u30e0&nbsp;<strong>404<\/strong>&nbsp;\u30a8\u30e9\u30fc \u30da\u30fc\u30b8\u3092\u5b9a\u7fa9\u3067\u304d\u308b Directory \u3068\u3044\u3046\u540d\u524d\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<code>404.js<\/code><code>pages<\/code><\/li>\n\n\n\n<li>\u30ab\u30b9\u30bf\u30e0 500 \u30da\u30fc\u30b8: \u30ab\u30b9\u30bf\u30e0&nbsp;<strong>500<\/strong>&nbsp;\u30a8\u30e9\u30fc \u30da\u30fc\u30b8\u3092\u5b9a\u7fa9\u3067\u304d\u308b Directory \u3068\u3044\u3046\u540d\u524d\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<code>500.js<\/code><code>pages<\/code><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8981<\/h3>\n\n\n\n<p>\u6b21\u306b.js\u30da\u30fc\u30b8\u306e\u4f5c\u6210\u3068\u7de8\u6210\u306f\u975e\u5e38\u306b\u30b7\u30f3\u30d7\u30eb\u3067\u76f4\u611f\u7684\u3067\u3042\u308a\u3001\u30d5\u30a1\u30a4\u30eb\u3068\u30d5\u30a9\u30eb\u30c0\u30fc\u306e\u69cb\u9020\u3060\u3051\u3067Web\u30b5\u30a4\u30c8\u5168\u4f53\u306e\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u69cb\u9020\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002 \u69cb\u6210\u3088\u308a\u3082\u898f\u5247\u306e\u3053\u306e\u30a2\u30d7\u30ed\u30fc\u30c1\u306b\u3088\u308a\u3001\u958b\u767a\u8005\u306f\u8907\u96d1\u306a\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u69cb\u6210\u3092\u6c17\u306b\u3059\u308b\u3053\u3068\u306a\u304f\u3001\u8907\u96d1\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u3088\u308a\u8fc5\u901f\u306b\u69cb\u7bc9\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u3053\u308c\u3089\u306e\u6982\u5ff5\u3092\u5b9f\u7528\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9 \u30c7\u30e2\u30f3\u30b9\u30c8\u30ec\u30fc\u30b7\u30e7\u30f3\u3067\u8aac\u660e\u3059\u308b\u3053\u3068\u3067\u3001\u65b0\u3057\u3044\u958b\u767a\u8005\u304c Next.js \u306e\u30da\u30fc\u30b8\u3068\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0 \u30b7\u30b9\u30c6\u30e0\u3092\u3059\u3070\u3084\u304f\u7406\u89e3\u3057\u3066\u63a1\u7528\u3059\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002 \u307e\u305f\u3001\u30b3\u30fc\u30c9\u306e\u69cb\u6210\u3068\u69cb\u9020\u3092\u6700\u9069\u5316\u3059\u308b\u65b9\u6cd5\u306b\u95a2\u3059\u308b\u30d9\u30b9\u30c8 \u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u3092\u63d0\u4f9b\u3057\u3066\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u3088\u308a\u4fdd\u5b88\u3057\u3084\u3059\u304f\u30b9\u30b1\u30fc\u30e9\u30d6\u30eb\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u69cb\u7bc9\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/chat.openai.com\/_next\/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAAcHTtdQvKTfcfwR0bXrfLjIN0Vmoln5pVObYXE2hRFieJsISok%3Ds96-c&amp;w=96&amp;q=75\" alt=\"User\"\/><\/figure>\n\n\n\n<p>\u30da\u30fc\u30b8\u3068\u30eb\u30fc\u30c8\u306e\u52d5\u7684\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u3066\u304f\u3060\u3055\u3044 ChatGPT<\/p>\n\n\n\n<p>\u3082\u3061\u308d\u3093\u3001Next.js\u306e\u52d5\u7684\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306f\u3001URL\u306e\u5909\u66f4\u306b\u5fdc\u3058\u3066\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u52d5\u7684\u306b\u30ed\u30fc\u30c9\u3059\u308b\u67d4\u8edf\u3067\u518d\u5229\u7528\u53ef\u80fd\u306a\u30da\u30fc\u30b8\u3092\u4f5c\u6210\u3067\u304d\u308b\u5f37\u529b\u306a\u6a5f\u80fd\u3067\u3059\u3002 \u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u30d3\u30c7\u30aa\u306e\u52d5\u7684\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u8a73\u7d30\u306a\u8aac\u660e\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30da\u30fc\u30b8\u3068\u30eb\u30fc\u30c8: \u52d5\u7684\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>1. \u52d5\u7684\u30eb\u30fc\u30c8\u3092\u4f5c\u6210\u3059\u308b<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u52d5\u7684\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3092\u5b9a\u7fa9\u3059\u308b\u306b\u306f\u3001\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u306e\u4e0b\u306b\u89d2\u62ec\u5f27\u4ed8\u304d\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 \u305f\u3068\u3048\u3070\u3001\u3068\u3044\u3046\u540d\u524d\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u304c\u30ad\u30e3\u30d7\u30c1\u30e3\u3055\u308c\u307e\u3059\u3002 jsxCopy code<code>pages<\/code><code>[id].js<\/code><code>id<\/code><code>\/\/ pages\/posts\/[id].js function Post({ post }) { return &lt;div&gt;{post.title}&lt;\/div&gt;; } export default Post;<\/code><\/li>\n\n\n\n<li>\u305f\u3068\u3048\u3070\u3001\u7279\u5b9a\u306e ID \u306b\u306f URL \u3092\u4ecb\u3057\u3066\u30a2\u30af\u30bb\u30b9\u3067\u304d\u3001\u30b3\u30f3\u30c6\u30f3\u30c4\u306f\u52d5\u7684\u306b\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3067\u304d\u307e\u3059\u3002<code>\/posts\/123<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>2. \u52d5\u7684\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30d5\u30c3\u30af\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u52d5\u7684\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306a\u3069\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u5185\u306e\u73fe\u5728\u306e\u30eb\u30fc\u30c8\u306b\u95a2\u3059\u308b\u60c5\u5831\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002 jsxCopy code<code>useRouter<\/code><code>import { useRouter } from 'next\/router'; function Post() { const router = useRouter(); const { id } = router.query; \/\/ ...\u4f7f\u7528id\u52a0\u8f7d\u548c\u663e\u793a\u5e16\u5b50 return &lt;div&gt;Post: {id}&lt;\/div&gt;; }<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>3. \u30cd\u30b9\u30c8\u3055\u308c\u305f\u52d5\u7684\u30eb\u30fc\u30c8<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u305f\u3068\u3048\u3070\u3001\u30cd\u30b9\u30c8\u3055\u308c\u305f\u52d5\u7684\u30eb\u30fc\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<code>[category]\/[id].js<\/code><\/li>\n\n\n\n<li>\u30a2\u30af\u30bb\u30b9\u306f\u3001\u306e\u30eb\u30fc\u30c8\u3068\u4e00\u81f4\u3057\u307e\u3059\u3002<code>\/movies\/123<\/code><code>category<\/code><code>movies<\/code><code>id<\/code><code>123<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>4.\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u52d5\u7684\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4e8c\u91cd\u89d2\u62ec\u5f27\u3092\u4f7f\u7528\u3057\u3066\u3001\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u52d5\u7684\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306a\u3069\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<code>[[...slug]].js<\/code><\/li>\n\n\n\n<li>\u3053\u308c\u306b\u3088\u308a\u3001\u8907\u6570\u306e\u5024\u3092\u914d\u5217\u3068\u3057\u3066\u30ad\u30e3\u30d7\u30c1\u30e3\u3067\u304d\u308b\u305f\u3081\u3001\u3088\u308a\u67d4\u8edf\u306a URL \u30d1\u30bf\u30fc\u30f3\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<code>slug<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>5. \u30c0\u30a4\u30ca\u30df\u30c3\u30af\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3068\u30c7\u30fc\u30bf\u53ce\u96c6<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Next.js \u3084 \u306a\u3069\u306e\u30c7\u30fc\u30bf\u53d6\u5f97\u65b9\u6cd5\u3068\u7d44\u307f\u5408\u308f\u305b\u308b\u3068\u3001\u69cb\u7bc9\u6642\u306b\u52d5\u7684\u30eb\u30fc\u30c8\u3092\u751f\u6210\u3067\u304d\u307e\u3059\u3002<code>getStaticPaths<\/code><code>getStaticProps<\/code><\/li>\n\n\n\n<li>\u3053\u308c\u306b\u3088\u308a\u3001\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3092\u52d5\u7684\u306b\u4fdd\u3061\u306a\u304c\u3089\u3001\u30da\u30fc\u30b8\u3092\u9759\u7684\u306b\u751f\u6210\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8981<\/h3>\n\n\n\n<p>\u6b21\u306b.js\u306e\u52d5\u7684\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u6a5f\u80fd\u306f\u3001\u8907\u96d1\u3067\u52d5\u7684\u306aWeb\u30b5\u30a4\u30c8\u3092\u69cb\u7bc9\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u67d4\u8edf\u6027\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002 \u5358\u7d14\u306a\u30d5\u30a1\u30a4\u30eb\u547d\u540d\u898f\u5247\u306b\u3088\u308a\u3001\u958b\u767a\u8005\u306f\u9762\u5012\u306a\u69cb\u6210\u306a\u3057\u3067\u8907\u96d1\u306a\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u69cb\u9020\u3092\u7c21\u5358\u306b\u5b9a\u7fa9\u304a\u3088\u3073\u7ba1\u7406\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u3053\u308c\u3089\u306e\u6982\u5ff5\u3092\u5b9f\u7528\u7684\u306a\u4f8b\u3068\u30c7\u30e2\u30f3\u30b9\u30c8\u30ec\u30fc\u30b7\u30e7\u30f3\u3067\u8a73\u7d30\u306b\u8aac\u660e\u3057\u3001\u52d5\u7684\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3092\u4f7f\u7528\u3057\u3066\u3088\u308a\u67d4\u8edf\u3067\u4fdd\u5b88\u3057\u3084\u3059\u3044 Web \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u69cb\u7bc9\u3059\u308b\u65b9\u6cd5\u3092\u793a\u3057\u307e\u3059\u3002 \u307e\u305f\u3001\u52d5\u7684\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3092 Next.js \u306e\u4ed6\u306e\u6a5f\u80fd (\u30d7\u30ea\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3084\u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u306a\u3069) \u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u4f7f\u7528\u3057\u3066\u3001\u6700\u65b0\u306e Web \u958b\u767a\u306b\u304a\u3051\u308b\u305d\u306e\u4fa1\u5024\u3092\u3055\u3089\u306b\u5f37\u8abf\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3082\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/chat.openai.com\/_next\/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAAcHTtdQvKTfcfwR0bXrfLjIN0Vmoln5pVObYXE2hRFieJsISok%3Ds96-c&amp;w=96&amp;q=75\" alt=\"User\"\/><\/figure>\n\n\n\n<p>ChatGPT\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3068CSS\u3092\u30ea\u30a2\u30af\u30b7\u30e7\u30f3\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f7f\u3063\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<p>\u3082\u3061\u308d\u3093\u3067\u3059\uff01 Next.js \u3067\u306f\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306f\u30da\u30fc\u30b8\u306e\u69cb\u6210\u8981\u7d20\u3067\u3042\u308a\u3001UI \u3092\u518d\u5229\u7528\u53ef\u80fd\u306a\u500b\u5225\u306e\u30d1\u30fc\u30c4\u306b\u5206\u5272\u3067\u304d\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306f\u3001\u7d14\u7c8b\u306a JavaScript \u95a2\u6570\u307e\u305f\u306f\u30af\u30e9\u30b9\u30d9\u30fc\u30b9\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u4f7f\u7528\u3067\u304d\u308b\u6b21\u306e.js\u3067React\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\u306e\u8a73\u7d30\u306a\u8aac\u660e\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3068CSS:\u53cd\u5fdc\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f7f\u7528\u3059\u308b<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>1. \u57fa\u672c\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u4f5c\u6210<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>React\u3068Next.js\u3067\u306f\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306f\u300cprops\u300d\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d7\u3051\u53d6\u308a\u3001React\u8981\u7d20\u3092\u8fd4\u3059\u5358\u7d14\u306a\u95a2\u6570\u306b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 jsxCopy code<code>function Button(props) { return &lt;button&gt;{props.label}&lt;\/button&gt;; }<\/code><\/li>\n\n\n\n<li>\u3053\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306f\u3001\u30da\u30fc\u30b8\u307e\u305f\u306f\u4ed6\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u5185\u3067\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002 jsxCopy code<code>function HomePage() { return &lt;Button label=\"Click me\" \/&gt;; }<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>2. \u30af\u30e9\u30b9\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f7f\u7528\u3059\u308b<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30af\u30e9\u30b9\u30d9\u30fc\u30b9\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u304c\u3001\u3053\u308c\u306f\u3088\u308a\u8907\u96d1\u306a\u30b7\u30ca\u30ea\u30aa\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u3002 jsxCopy code<code>class Welcome extends React.Component { render() { return &lt;h1&gt;Hello, {this.props.name}&lt;\/h1&gt;; } }<\/code><\/li>\n\n\n\n<li>\u30af\u30e9\u30b9\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u3088\u308a\u591a\u304f\u306e\u30e9\u30a4\u30d5\u30b5\u30a4\u30af\u30eb\u30e1\u30bd\u30c3\u30c9\u3068\u72b6\u614b\u7ba1\u7406\u6a5f\u80fd\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>3. \u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u72b6\u614b\u7ba1\u7406<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306f\u72ec\u81ea\u306e\u72b6\u614b\u3092\u6301\u3064\u3053\u3068\u304c\u3067\u304d\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306f\u518d\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u6642\u306b\u60c5\u5831\u3092\u4fdd\u6301\u3067\u304d\u307e\u3059\u3002 jsxCopy code<code>import React, { useState } from 'react'; function Counter() { const [count, setCount] = useState(0); return ( &lt;div&gt; &lt;p&gt;You clicked {count} times&lt;\/p&gt; &lt;button onClick={() =&gt; setCount(count + 1)}&gt;Click me&lt;\/button&gt; &lt;\/div&gt; ); }<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>4.\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u30b9\u30bf\u30a4\u30eb<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6b21\u306b.js\u6a19\u6e96\u306eCSS\u30d5\u30a1\u30a4\u30eb\u307e\u305f\u306fCSS-in-JS\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3057\u3066\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u30b9\u30bf\u30a4\u30eb\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u3059\u3002<\/li>\n\n\n\n<li>CSS \u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3001\u30e2\u30b8\u30e5\u30e9\u30fc CSS \u3092\u4f7f\u7528\u3057\u3066\u3001\u30b9\u30bf\u30a4\u30eb\u304c\u7279\u5b9a\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306b\u306e\u307f\u9069\u7528\u3055\u308c\u308b\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 css\u30b3\u30d4\u30fc\u30b3\u30fc\u30c9jsx\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30fc<code>\/\/ styles\/Button.module.css .button { background-color: blue; color: white; }&nbsp;<\/code><code>\/\/ \u5bfc\u5165\u6837\u5f0f import styles from '..\/styles\/Button.module.css'; function Button(props) { return &lt;button className={styles.button}&gt;{props.label}&lt;\/button&gt;; }<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>5.\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u518d\u5229\u7528\u3068\u7d44\u307f\u5408\u308f\u305b<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u518d\u5229\u7528\u53ef\u80fd\u306a\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u3067\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u3055\u307e\u3056\u307e\u306a\u90e8\u5206\u3092\u7d71\u4e00\u3055\u308c\u305f\u5168\u4f53\u306b\u7de8\u6210\u3067\u304d\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u3001\u3088\u308a\u8907\u96d1\u306a UI \u69cb\u9020\u3092\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8981<\/h3>\n\n\n\n<p>React\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306f\u3001Next.js\u304a\u3088\u3073\u6700\u65b0\u306eWeb\u958b\u767a\u306e\u57fa\u76e4\u3067\u3059\u3002 \u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f5c\u6210\u3057\u3066\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u3001\u958b\u767a\u8005\u306f\u8907\u96d1\u3067\u4fdd\u5b88\u3057\u3084\u3059\u304f\u3001\u30b9\u30b1\u30fc\u30e9\u30d6\u30eb\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u69cb\u7bc9\u3067\u304d\u307e\u3059\u3002 \u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u52b9\u679c\u7684\u306b\u4f7f\u7528\u3057\u3066\u5b9f\u969b\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u69cb\u7bc9\u3059\u308b\u65b9\u6cd5\u3092\u3001\u30b5\u30f3\u30d7\u30eb\u3068\u5b9f\u969b\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u901a\u3058\u3066\u793a\u3057\u3001\u5bfe\u8c61\u30e6\u30fc\u30b6\u30fc\u304c\u3053\u308c\u3089\u306e\u4e3b\u8981\u306a\u6982\u5ff5\u3092\u7406\u89e3\u3057\u3066\u7fd2\u5f97\u3059\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/chat.openai.com\/_next\/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAAcHTtdQvKTfcfwR0bXrfLjIN0Vmoln5pVObYXE2hRFieJsISok%3Ds96-c&amp;w=96&amp;q=75\" alt=\"User\"\/><\/figure>\n\n\n\n<p>\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306eCSS\u30e9\u30a4\u30d6\u30e9\u30eaChatGPT\u3092\u4f7f\u7528\u3057\u3066\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3068CSS\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<p>Next.js\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306eCSS\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u306f\u3001\u30d7\u30ea\u30d7\u30ed\u30bb\u30c3\u30b5\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3067\u3082\u3001\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u3001Tailwind CSS\u306a\u3069\u306e\u4e00\u822c\u7684\u306a\u30b9\u30bf\u30a4\u30eb\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3067\u3082\u3001\u4e00\u822c\u7684\u306a\u30bf\u30b9\u30af\u3067\u3059\u3002 \u6b21\u306e.js\u3067\u3001IT\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u306b\u9069\u3057\u305f\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306eCSS\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\u306e\u8a73\u7d30\u306a\u624b\u9806\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3068 CSS: \u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306e CSS \u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3059\u308b<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>1.\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u307e\u305a\u3001npm\u307e\u305f\u306fyarn\u3092\u4f7f\u7528\u3057\u3066\u3001\u4f7f\u7528\u3059\u308b\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u305f\u3068\u3048\u3070\u3001\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002<code>npm install bootstrap # \u6216\u8005 yarn add bootstrap<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>2.\u6b21\u306e.js\u3067\u30b9\u30bf\u30a4\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u307e\u3059<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u305f\u3068\u3048\u3070\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30a8\u30f3\u30c8\u30ea\u30d5\u30a1\u30a4\u30eb\u306b CSS \u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3067\u304d\u307e\u3059\u3002 \u3053\u308c\u306b\u3088\u308a\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5168\u4f53\u3067\u30b9\u30bf\u30a4\u30eb\u3092\u4f7f\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 jsxCopy code<code>_app.js<\/code><code>\/\/ pages\/_app.js import 'bootstrap\/dist\/css\/bootstrap.min.css'; function MyApp({ Component, props }) { return &lt;Component {...props} \/&gt;; } export default MyApp;<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>3.\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3068\u30af\u30e9\u30b9\u3092\u4f7f\u7528\u3059\u308b<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u304b\u3089\u30b9\u30bf\u30a4\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u305f\u3089\u3001\u305d\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u3088\u3063\u3066\u63d0\u4f9b\u3055\u308c\u308b\u30b9\u30bf\u30a4\u30eb\u30af\u30e9\u30b9\u3068\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3067\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002 jsxCopy code<code>\/\/ \u4f7f\u7528Bootstrap\u7c7b function MyButton() { return &lt;button className=\"btn btn-primary\"&gt;Click me&lt;\/button&gt;; }<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>4.\u30d7\u30ea\u30d7\u30ed\u30bb\u30c3\u30b5(Sass\u3001Less\u306a\u3069)\u3092\u4f7f\u7528\u3057\u307e\u3059<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u30d7\u30ea\u30d7\u30ed\u30bb\u30c3\u30b5\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u4f9d\u5b58\u95a2\u4fc2\u3082\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u305f\u3068\u3048\u3070\u3001Sass\u3092\u4f7f\u7528\u3059\u308b\u306b\u306f\u3001sass\u4f9d\u5b58\u95a2\u4fc2bashCopy\u30b3\u30fc\u30c9\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059<code>npm install sass # \u6216\u8005 yarn add sass<\/code><\/li>\n\n\n\n<li>\u305d\u306e\u5f8c\u3001Sass\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3066\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>5.\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30b9\u30bf\u30a4\u30eb\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u307e\u3059<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u591a\u304f\u306e\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u306f\u3001\u5909\u6570\u3092\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9\u3057\u305f\u308a\u3001\u8ffd\u52a0\u306eCSS\u3092\u8a18\u8ff0\u3057\u305f\u308a\u3059\u308b\u3053\u3068\u3067\u3001\u30b9\u30bf\u30a4\u30eb\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3067\u304d\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u5225\u306eCSS\u307e\u305f\u306fSass\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u3001\u30ab\u30b9\u30bf\u30e0\u30b9\u30bf\u30a4\u30eb\u3092\u4fdd\u5b58\u3057\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u30a4\u30f3\u30dd\u30fc\u30c8\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8981<\/h3>\n\n\n\n<p>\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306e CSS \u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001Next.js \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u958b\u767a\u3092\u5927\u5e45\u306b\u9ad8\u901f\u5316\u3057\u3001\u65e2\u5b58\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3068\u30b9\u30bf\u30a4\u30eb\u3092\u6d3b\u7528\u3067\u304d\u307e\u3059\u3002 \u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u5b9f\u969b\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u3053\u308c\u3089\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u7d71\u5408\u304a\u3088\u3073\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u65b9\u6cd5\u3068\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30cb\u30fc\u30ba\u306b\u5408\u3063\u305f\u9069\u5207\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u9078\u629e\u3059\u308b\u65b9\u6cd5\u3092\u793a\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3044\u304f\u3064\u304b\u306e\u4e00\u822c\u7684\u306aCSS\u30e9\u30a4\u30d6\u30e9\u30ea(\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u3001Tailwind CSS\u3001Bulma\u306a\u3069)\u3092\u4f7f\u7528\u3057\u3066\u3001\u305d\u308c\u3089\u306e\u6a5f\u80fd\u3068\u5229\u70b9\u3001\u304a\u3088\u3073\u305d\u308c\u3089\u304cNext.js\u304a\u3088\u3073React\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3068\u3069\u306e\u3088\u3046\u306b\u9023\u643a\u3059\u308b\u304b\u3092\u793a\u3059\u3053\u3068\u3092\u691c\u8a0e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u3053\u308c\u306b\u3088\u308a\u3001\u8996\u8074\u8005\u306b\u8cb4\u91cd\u306a\u5b9f\u8df5\u7684\u306a\u4f53\u9a13\u304c\u63d0\u4f9b\u3055\u308c\u3001\u8996\u8074\u8005\u304c\u81ea\u5206\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u3053\u308c\u3089\u306e\u30c4\u30fc\u30eb\u3092\u3088\u308a\u52b9\u679c\u7684\u306b\u4f7f\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/chat.openai.com\/_next\/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAAcHTtdQvKTfcfwR0bXrfLjIN0Vmoln5pVObYXE2hRFieJsISok%3Ds96-c&amp;w=96&amp;q=75\" alt=\"User\"\/><\/figure>\n\n\n\n<p>ChatGPT\u3067\u9759\u7684\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306bgetStaticProps\u3092\u4f7f\u7528\u3057\u3066\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u3092\u8a73\u3057\u304f\u8aac\u660e\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<p>\u3082\u3061\u308d\u3093\u3067\u3059\uff01 Next .js\u3067\u306f\u3001\u30d3\u30eb\u30c9\u6642\u306b\u30c7\u30fc\u30bf\u3092\u30d5\u30a7\u30c3\u30c1\u3057\u3001\u9759\u7684\u30da\u30fc\u30b8\u3092\u751f\u6210\u3059\u308b\u305f\u3081\u306e\u975e\u5e38\u306b\u91cd\u8981\u306a\u30c7\u30fc\u30bf\u30d5\u30a7\u30c3\u30c1\u65b9\u6cd5\u3067\u3059\u3002 \u3053\u3053\u3067\u306f\u3001IT\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u30d3\u30c7\u30aa\u306b\u9069\u3057\u305f\u9759\u7684\u30c7\u30fc\u30bf\u306e\u53d6\u5f97\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u3066\u3044\u307e\u3059\u3002<code>getStaticProps<\/code><code>getStaticProps<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30c7\u30fc\u30bf\u306e\u53d6\u5f97: \u9759\u7684\u30c7\u30fc\u30bf\u306e\u53d6\u5f97\u3092\u4f7f\u7528\u3059\u308b<code>getStaticProps<\/code><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>1.<code>\u53d6\u5f97\u9759\u7684\u5c0f\u9053\u5177<\/code>\u3068\u306f\u4f55\u3067\u3059\u304b<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>getStaticProps<\/code>\u306f Next \u306e\u975e\u540c\u671f\u95a2\u6570\u3067.js\u30d3\u30eb\u30c9\u6642\u306b\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3001API\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306a\u3069\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u7d50\u679c\u306fReact\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3068\u3057\u3066\u6e21\u3055\u308c\u3001\u9759\u7684HTML\u3092\u4f7f\u7528\u3057\u3066\u30d3\u30eb\u30c9\u6642\u306b\u751f\u6210\u3055\u308c\u307e\u3059\u3002<code>props<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>2.&nbsp;<code>getStaticProps<\/code>&nbsp;\u306e\u4f7f\u3044\u65b9<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30da\u30fc\u30b8\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u30d5\u30a1\u30a4\u30eb\u3067\u306f\u3001jsxCopy \u30b3\u30fc\u30c9\u3068\u3044\u3046\u975e\u540c\u671f\u95a2\u6570\u3092\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3067\u304d\u307e\u3059<code>getStaticProps<\/code><code>export async function getStaticProps(context) { \/\/ \u83b7\u53d6\u6570\u636e\u7684\u4ee3\u7801 const data = await fetchData(); return { props: { data }, \/\/ \u5c06\u6570\u636e\u4f20\u9012\u7ed9\u9875\u9762\u7ec4\u4ef6 }; }<\/code><\/li>\n\n\n\n<li>\u30da\u30fc\u30b8\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306f\u30c7\u30fc\u30bf\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3001\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u306b\u4f7f\u7528\u3067\u304d\u307e\u3059: jsxCopy \u30b3\u30fc\u30c9<code>props<\/code><code>function MyPage({ data }) { \/\/ \u4f7f\u7528\u6570\u636e\u6e32\u67d3\u9875\u9762 }<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>3. \u958b\u767a\u74b0\u5883\u3067\u306e\u52d5\u4f5c<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u958b\u767a\u30e2\u30fc\u30c9 (\u4f7f\u7528) \u3067\u306f\u3001\u3059\u3079\u3066\u306e\u8981\u6c42\u3067\u5b9f\u884c\u3057\u307e\u3059\u3002<code>next dev<\/code><code>getStaticProps<\/code><\/li>\n\n\n\n<li>\u3053\u308c\u306b\u3088\u308a\u3001\u958b\u767a\u8005\u306f\u5909\u66f4\u3092\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u3067\u78ba\u8a8d\u3057\u3001\u958b\u767a\u4e2d\u306e\u30c7\u30d0\u30c3\u30b0\u3092\u5bb9\u6613\u306b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>4.&nbsp;<code>getStaticPaths<\/code>&nbsp;\u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u4f7f\u7528\u3059\u308b<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u52d5\u7684\u306b\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3055\u308c\u305f\u9759\u7684\u30da\u30fc\u30b8\u304c\u3042\u308b\u5834\u5408\u306f\u3001\u3053\u308c\u3092\u4f7f\u7528\u3057\u3066\u3001\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u30d1\u30b9\u3092\u5b9a\u7fa9\u3067\u304d\u307e\u3059\u3002 jsxCopy code<code>getStaticPaths<\/code><code>export async function getStaticPaths() { \/\/ \u8fd4\u56de\u8def\u5f84\u5217\u8868 }<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>5. \u5916\u90e8\u30c7\u30fc\u30bf\u3092\u4f7f\u7528\u3059\u308b<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>REST API\u3001GraphQL\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306a\u3069\u306e\u3055\u307e\u3056\u307e\u306a\u5916\u90e8\u30bd\u30fc\u30b9\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002 jsxCopy code<code>export async function getStaticProps() { const res = await fetch('https:\/\/api.example.com\/posts'); const data = await res.json(); return { props: { data }, }; }<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>6. \u30a8\u30e9\u30fc\u51e6\u7406\u3068\u30ea\u30c0\u30a4\u30ec\u30af\u30c8<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30a8\u30e9\u30fc\u3068\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3092\u51e6\u7406\u3059\u308b\u306b\u306f\u3001\u623b\u308b\u304b\u3001\u4f7f\u7528\u3057\u307e\u3059\u3002<code>notFound: true<\/code><code>redirect<\/code><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8981<\/h3>\n\n\n\n<p><code>getStaticProps<\/code>\u306fNext\u306e\u5f37\u529b\u306a\u30c4\u30fc\u30eb\u3067\u3042\u308a.js\u30d3\u30eb\u30c9\u6642\u306b\u9759\u7684\u30da\u30fc\u30b8\u3092\u751f\u6210\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3067\u304d\u3001\u30e6\u30fc\u30b6\u30fc\u306b\u8aad\u307f\u8fbc\u307f\u901f\u5ea6\u306e\u5411\u4e0a\u3068SEO\u306e\u6700\u9069\u5316\u306e\u5411\u4e0a\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002 \u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u5358\u7d14\u306a\u9759\u7684\u30c7\u30fc\u30bf \u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u304b\u3089\u8907\u96d1\u306a\u5916\u90e8 API \u547c\u3073\u51fa\u3057\u307e\u3067\u3001\u3055\u307e\u3056\u307e\u306a\u4f7f\u7528\u4f8b\u3092\u793a\u3057\u3066\u3001\u5bfe\u8c61\u30e6\u30fc\u30b6\u30fc\u304c\u6982\u5ff5\u3092\u7406\u89e3\u3057\u3001\u72ec\u81ea\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u5b9f\u88c5\u3059\u308b\u65b9\u6cd5\u3092\u5b66\u7fd2\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/chat.openai.com\/_next\/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAAcHTtdQvKTfcfwR0bXrfLjIN0Vmoln5pVObYXE2hRFieJsISok%3Ds96-c&amp;w=96&amp;q=75\" alt=\"User\"\/><\/figure>\n\n\n\n<p>\u8bf7\u8be6\u7ec6\u89e3\u91ca \u6570\u636e\u83b7\u53d6\u7684\u4f7f\u7528getServerSideProps\u83b7\u53d6\u670d\u52a1\u5668\u7aef\u6570\u636eChatGPT<\/p>\n\n\n\n<p>\u5f53\u7136\uff0c\u8ba9\u6211\u4eec\u6df1\u5165\u4e86\u89e3Next.js\u4e2d\u7684\u51fd\u6570\uff0c\u7528\u4e8e\u670d\u52a1\u5668\u7aef\u6e32\u67d3\u548c\u6570\u636e\u83b7\u53d6\u3002<code>getServerSideProps<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6570\u636e\u83b7\u53d6\uff1a\u4f7f\u7528\u83b7\u53d6\u670d\u52a1\u5668\u7aef\u6570\u636e<code>getServerSideProps<\/code><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>1. \u4ec0\u4e48\u662f<code>getServerSideProps<\/code><\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>getServerSideProps<\/code>\u662f\u4e00\u4e2a\u4e13\u95e8\u7528\u4e8e\u670d\u52a1\u5668\u7aef\u6e32\u67d3\u7684\u5f02\u6b65\u51fd\u6570\uff0c\u5728\u6bcf\u4e2a\u9875\u9762\u8bf7\u6c42\u65f6\u8fd0\u884c\u3002<\/li>\n\n\n\n<li>\u4e0e\u4e0d\u540c\uff0c\u5b83\u5141\u8bb8\u6bcf\u4e2a\u8bf7\u6c42\u90fd\u83b7\u53d6\u65b0\u7684\u6570\u636e\uff0c\u9002\u7528\u4e8e\u9700\u8981\u5b9e\u65f6\u66f4\u65b0\u7684\u5185\u5bb9\u3002<code>getStaticProps<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>2. \u5982\u4f55\u4f7f\u7528<code>getServerSideProps<\/code><\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5728\u9875\u9762\u7ec4\u4ef6\u6587\u4ef6\u4e2d\uff0c\u4f60\u53ef\u4ee5\u5bfc\u51fa\u4e00\u4e2a\u540d\u4e3a\u7684\u5f02\u6b65\u51fd\u6570\uff1ajsxCopy code<code>getServerSideProps<\/code><code>export async function getServerSideProps(context) { \/\/ \u83b7\u53d6\u6570\u636e\u7684\u4ee3\u7801 const data = await fetchData(); return { props: { data }, \/\/ \u5c06\u6570\u636e\u4f20\u9012\u7ed9\u9875\u9762\u7ec4\u4ef6 }; }<\/code><\/li>\n\n\n\n<li>\u9875\u9762\u7ec4\u4ef6\u53ef\u4ee5\u8bbf\u95ee\u4e2d\u7684\u6570\u636e\uff0c\u5e76\u5c06\u5176\u7528\u4e8e\u6e32\u67d3\uff1ajsxCopy code<code>props<\/code><code>function MyPage({ data }) { \/\/ \u4f7f\u7528\u6570\u636e\u6e32\u67d3\u9875\u9762 }<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>3. \u8bbf\u95ee\u4e0a\u4e0b\u6587\u5bf9\u8c61<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>getServerSideProps<\/code>\u3053\u306e\u95a2\u6570\u306f\u3001\u8981\u6c42\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u5fdc\u7b54\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3001\u30af\u30a8\u30ea \u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306a\u3069\u3001\u30b5\u30fc\u30d0\u30fc\u5074\u306e\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u306b\u95a2\u9023\u3059\u308b\u3042\u3089\u3086\u308b\u7a2e\u985e\u306e\u6709\u7528\u306a\u60c5\u5831\u3092\u542b\u3080\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8 \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d7\u3051\u53d6\u308a\u307e\u3059\u3002 jsxCopy code<code>export async function getServerSideProps(context) { const { req, res, query } = context; \/\/ ... }<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>4. \u5916\u90e8\u30c7\u30fc\u30bf\u3092\u4f7f\u7528\u3059\u308b<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u540c\u69d8\u306b\u3001REST API\u3001GraphQL\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306a\u3069\u306e\u3055\u307e\u3056\u307e\u306a\u5916\u90e8\u30bd\u30fc\u30b9\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002 jsxCopy code<code>getStaticProps<\/code><code>export async function getServerSideProps() { const res = await fetch('https:\/\/api.example.com\/user'); const data = await res.json(); return { props: { data }, }; }<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>5. \u30a8\u30e9\u30fc\u51e6\u7406\u3068\u30ea\u30c0\u30a4\u30ec\u30af\u30c8<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30a8\u30e9\u30fc\u3084\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3092\u51e6\u7406\u3059\u308b\u306b\u306f\u3001jsxCopy \u30b3\u30fc\u30c9\u306a\u3069\u306e\u7279\u5b9a\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8fd4\u3057\u307e\u3059<code>return { notFound: true, \/\/ \u8fd4\u56de404\u9875\u9762 redirect: { \/\/ \u91cd\u5b9a\u5411\u5230\u5176\u4ed6\u9875\u9762 destination: '\/another-page', permanent: false, }, };<\/code><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8981<\/h3>\n\n\n\n<p><code>getServerSideProps<\/code>\u30da\u30fc\u30b8\u3092\u30b5\u30fc\u30d0\u30fc\u5074\u3067\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3059\u308b\u3068\u304d\u306b\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u304a\u3088\u3073\u4f7f\u7528\u3059\u308b\u305f\u3081\u306e\u5f37\u529b\u306a\u6a5f\u80fd\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002 \u9759\u7684\u751f\u6210\u3068\u306f\u7570\u306a\u308a\u3001\u30b5\u30fc\u30d0\u30fc\u5074\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3067\u306f\u3001\u8981\u6c42\u3054\u3068\u306b\u65b0\u3057\u3044\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u8fd4\u3059\u3053\u3068\u304c\u3067\u304d\u308b\u305f\u3081\u3001\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u307e\u305f\u306f\u983b\u7e41\u306b\u30c7\u30fc\u30bf\u3092\u66f4\u65b0\u3059\u308b\u306e\u306b\u6700\u9069\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u5916\u90e8 API \u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u3001\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8 \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u5229\u7528\u3059\u308b\u65b9\u6cd5\u306a\u3069\u3001\u5b9f\u7528\u7684\u306a\u4f8b\u3092\u4f7f\u7528\u3057\u3066\u3053\u306e\u6982\u5ff5\u3092\u793a\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u5b9f\u969b\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u7d39\u4ecb\u3059\u308b\u3053\u3068\u3067\u3001\u8996\u8074\u8005\u306f\u9055\u3044\u3092\u7406\u89e3\u3057\u3001\u3053\u306e\u5f37\u529b\u306a\u6a5f\u80fd\u3092\u81ea\u5206\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u3044\u3064\u3069\u306e\u3088\u3046\u306b\u4f7f\u7528\u3059\u308b\u304b\u3092\u7406\u89e3\u3059\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<code>getServerSideProps<\/code><code>getStaticProps<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/chat.openai.com\/_next\/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAAcHTtdQvKTfcfwR0bXrfLjIN0Vmoln5pVObYXE2hRFieJsISok%3Ds96-c&amp;w=96&amp;q=75\" alt=\"User\"\/><\/figure>\n\n\n\n<p>\u30c7\u30fc\u30bf\u53d6\u5f97ChatGPT\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u306e\u30c7\u30fc\u30bf\u53d6\u5f97\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<p>\u3082\u3061\u308d\u3093\u3001Next.js\u304c\u63d0\u4f9b\u3059\u308b\u65b9\u6cd5\u306b\u52a0\u3048\u3066\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u306e\u30c7\u30fc\u30bf\u53d6\u5f97\u3082\u4e00\u822c\u7684\u306a\u30c7\u30fc\u30bf\u53d6\u5f97\u6226\u7565\u3067\u3059\u3002 \u9069\u5207\u306aIT\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u30d3\u30c7\u30aa\u306e\u8a73\u7d30\u306a\u8aac\u660e\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<code>getStaticProps<\/code><code>getServerSideProps<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30c7\u30fc\u30bf\u53d6\u5f97: \u30af\u30e9\u30a4\u30a2\u30f3\u30c8 \u30c7\u30fc\u30bf \u30d5\u30a7\u30c3\u30c1<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>1. \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u306e\u30c7\u30fc\u30bf\u53d6\u5f97\u3068\u306f\u4f55\u3067\u3059\u304b?<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u306e\u30c7\u30fc\u30bf\u30d5\u30a7\u30c3\u30c1\u3068\u306f\u3001\u901a\u5e38\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u30da\u30fc\u30b8\u3092\u64cd\u4f5c\u3059\u308b\u3068\u304d\u306b\u3001\u30d6\u30e9\u30a6\u30b6\u3067\u5b9f\u884c\u3055\u308c\u3066\u3044\u308bJavaScript\u3067\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u3067\u3059\u3002<\/li>\n\n\n\n<li>\u3053\u306e\u30a2\u30d7\u30ed\u30fc\u30c1\u306f\u3001\u9ad8\u3044\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u6027\u3092\u5fc5\u8981\u3068\u3059\u308b\u30c7\u30fc\u30bf\u3001\u983b\u7e41\u306b\u5909\u66f4\u3055\u308c\u308b\u30c7\u30fc\u30bf\u3001\u307e\u305f\u306f\u30e6\u30fc\u30b6\u30fc\u306e\u64cd\u4f5c\u306b\u4f9d\u5b58\u3059\u308b\u30c7\u30fc\u30bf\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>2.\u30d6\u30e9\u30a6\u30b6\u306e\u30d5\u30a7\u30c3\u30c1API\u3092\u4f7f\u7528\u3059\u308b<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30d6\u30e9\u30a6\u30b6\u30fc\u306b\u306f\u3001API \u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u306a\u3069\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30ea\u30bd\u30fc\u30b9\u3092\u975e\u540c\u671f\u7684\u306b\u30d5\u30a7\u30c3\u30c1\u3059\u308b\u305f\u3081\u306e\u30d5\u30a7\u30c3\u30c1 API \u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002<code>fetch('https:\/\/api.example.com\/data') .then((response) =&gt; response.json()) .then((data) =&gt; { \/\/ \u4f7f\u7528\u6570\u636e });<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>3.\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3059\u308b<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Axios\u306e\u3088\u3046\u306a\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3057\u3066\u3001HTTP\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u7c21\u7d20\u5316\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<code>import axios from 'axios'; axios.get('https:\/\/api.example.com\/data') .then((response) =&gt; { \/\/ \u4f7f\u7528\u6570\u636e });<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>4.\u53cd\u5fdc\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3067\u306e\u4f7f\u7528<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>React\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3067\u306f\u3001\u72b6\u614b\u30d5\u30c3\u30af\u3068\u30a8\u30d5\u30a7\u30af\u30c8\u30d5\u30c3\u30af\u306e\u7d44\u307f\u5408\u308f\u305b\u3092\u4f7f\u7528\u3057\u3066\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u306e\u30c7\u30fc\u30bf\u30d5\u30a7\u30c3\u30c1\u3092\u7ba1\u7406\u3067\u304d\u307e\u3059\u3002 jsxCopy \u30b3\u30fc\u30c9<code>import { useState, useEffect } from 'react'; function MyComponent() { const [data, setData] = useState(null); useEffect(() =&gt; { fetch('https:\/\/api.example.com\/data') .then((response) =&gt; response.json()) .then((data) =&gt; setData(data)); }, []); \/\/ \u7a7a\u4f9d\u8d56\u6570\u7ec4\u8868\u793a\u53ea\u5728\u6302\u8f7d\u65f6\u8fd0\u884c return ( &lt;div&gt; {data ? `Data: ${data.value}` : 'Loading...'} &lt;\/div&gt; ); }<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>5.SWR\u3084React\u30af\u30a8\u30ea\u306a\u3069\u306e\u30c7\u30fc\u30bf\u53ce\u96c6\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3059\u308b<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>SWR\u3084React Query\u306a\u3069\u306e\u7279\u6b8a\u306a\u30c7\u30fc\u30bf\u53d6\u5f97\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u3042\u308a\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u3001\u518d\u691c\u8a3c\u3001\u305d\u306e\u4ed6\u306e\u9ad8\u5ea6\u306a\u6a5f\u80fd\u306a\u3069\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u306e\u30c7\u30fc\u30bf\u30d5\u30a7\u30c3\u30c1\u3092\u3088\u308a\u30a8\u30ec\u30ac\u30f3\u30c8\u306b\u7ba1\u7406\u3059\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002 jsxCopy \u30b3\u30fc\u30c9<code>\/\/ \u4f7f\u7528SWR import useSWR from 'swr'; function MyComponent() { const { data, error } = useSWR('https:\/\/api.example.com\/data', fetcher); \/\/ \u6e32\u67d3\u903b\u8f91 }<\/code><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8981<\/h3>\n\n\n\n<p>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u306e\u30c7\u30fc\u30bf\u53d6\u5f97\u306f\u3001\u3055\u307e\u3056\u307e\u306a\u30b7\u30ca\u30ea\u30aa\u3084\u8981\u4ef6\u306b\u9069\u7528\u3067\u304d\u308b\u67d4\u8edf\u306a\u30c7\u30fc\u30bf\u53d6\u5f97\u6226\u7565\u3067\u3059\u3002 \u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u3055\u307e\u3056\u307e\u306a\u30e1\u30bd\u30c3\u30c9\u3068\u30c4\u30fc\u30eb\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u3001\u5b9f\u969b\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u306e\u30c7\u30fc\u30bf \u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u3092\u5b9f\u88c5\u3059\u308b\u65b9\u6cd5\u3092\u793a\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u306e\u30c7\u30fc\u30bf \u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u3092\u3044\u3064\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u304b\u3092\u30e6\u30fc\u30b6\u30fc\u304c\u7406\u89e3\u3059\u308b\u306e\u306b\u5f79\u7acb\u3064\u3060\u3051\u3067\u306a\u304f\u3001\u3053\u306e\u30bf\u30b9\u30af\u3092\u52b9\u7387\u7684\u304b\u3064\u9069\u5207\u306b\u5b9f\u884c\u3059\u308b\u65b9\u6cd5\u3082\u793a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/chat.openai.com\/_next\/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAAcHTtdQvKTfcfwR0bXrfLjIN0Vmoln5pVObYXE2hRFieJsISok%3Ds96-c&amp;w=96&amp;q=75\" alt=\"User\"\/><\/figure>\n\n\n\n<p>\u30c1\u30e3\u30c3\u30c8GPT\u3067\u306eAPI\u30eb\u30fc\u30c8\u306e\u4f5c\u6210\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<p>\u3082\u3061\u308d\u3093\u3067\u3059\uff01 \u6b21\u306b.js\u306eAPI\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306b\u3088\u308a\u3001\u3055\u307e\u3056\u307e\u306a\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u4f7f\u7528\u3067\u304d\u308bAPI\u3092\u7c21\u5358\u306b\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002 IT\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u30d3\u30c7\u30aa\u306b\u9069\u3057\u305fAPI\u30eb\u30fc\u30c8\u3092\u6b21\u306e.js\u3067\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u306e\u8a73\u7d30\u306a\u8aac\u660e\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">API \u30eb\u30fc\u30c8: API \u30eb\u30fc\u30c8\u3092\u4f5c\u6210\u3059\u308b<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>1. API \u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3068\u306f\u4f55\u3067\u3059\u304b?<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6b21\u306b.js API \u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001Next.js \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u72ec\u81ea\u306e API \u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u69cb\u7bc9\u3067\u304d\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u3053\u308c\u3089\u306e API \u306f\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5185\u5916\u306e\u4ed6\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3067\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>2. API \u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u5834\u6240<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>API \u30eb\u30fc\u30c8\u3092\u4f5c\u6210\u3059\u308b\u306b\u306f\u3001\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<code>pages\/api<\/code><\/li>\n\n\n\n<li>\u30d5\u30a1\u30a4\u30eb\u306e\u540d\u524d\u3068\u69cb\u9020\u306b\u3088\u3063\u3066\u3001\u30eb\u30fc\u30c8\u306e\u69cb\u9020\u304c\u6c7a\u307e\u308a\u307e\u3059\u3002 \u305f\u3068\u3048\u3070\u3001\u306b\u5bfe\u5fdc\u3059\u308b\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u306a\u3069\u3067\u3059\u3002<code>pages\/api\/user.js<\/code><code>\/api\/user<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>3. \u57fa\u672c\u7684\u306a API \u30eb\u30fc\u30c8\u306e\u4f5c\u6210<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>API \u30eb\u30fc\u30c8\u3092\u4f5c\u6210\u3059\u308b\u306b\u306f\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d7\u3051\u5165\u308c\u308b\u95a2\u6570 (javascriptCopy \u30b3\u30fc\u30c9) \u3092\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3057\u307e\u3059<code>request<\/code><code>response<\/code><code>\/\/ pages\/api\/user.js export default function handler(req, res) { res.status(200).json({ name: 'John Doe' }); }<\/code><\/li>\n\n\n\n<li>\u4e0a\u8a18\u306e\u4f8b\u3067\u306f\u3001\u8ab0\u304b\u304c\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3001JSON\u5fdc\u7b54\u304c\u8fd4\u3055\u308c\u307e\u3059\u3002<code>\/api\/user<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>4.\u3055\u307e\u3056\u307e\u306aHTTP\u30e1\u30bd\u30c3\u30c9\u3092\u51e6\u7406\u3057\u307e\u3059<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30ea\u30af\u30a8\u30b9\u30c8\u306eHTTP\u30e1\u30bd\u30c3\u30c9\u306b\u5fdc\u3058\u3066\u7570\u306a\u308b\u64cd\u4f5c\u3092\u5b9f\u884c\u3067\u304d\u307e\u3059(\u4f8b:GET\u3001POST\u306a\u3069): javascript\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30fc\u3059\u308b<code>export default function handler(req, res) { if (req.method === 'GET') { \/\/ \u5904\u7406GET\u8bf7\u6c42 } else if (req.method === 'POST') { \/\/ \u5904\u7406POST\u8bf7\u6c42 } else { \/\/ \u5176\u4ed6\u60c5\u51b5 res.status(405).end(); \/\/ \u8fd4\u56de\"Method Not Allowed\" } }<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>5.\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3092\u4f7f\u7528\u3059\u308b<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>API\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3067\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3092\u4f7f\u7528\u3057\u3066\u3001\u30af\u30ed\u30b9\u30aa\u30ea\u30b8\u30f3\u30ea\u30bd\u30fc\u30b9\u5171\u6709(CORS)\u306e\u554f\u984c\u3092\u51e6\u7406\u3057\u305f\u308a\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u30dc\u30c7\u30a3\u3092\u89e3\u6790\u3057\u305f\u308a\u3067\u304d\u307e\u3059\u3002<code>import Cors from 'cors'; const cors = Cors({ methods: ['GET', 'HEAD'], }); export default function handler(req, res) { \/\/ \u8fd0\u884c\u4e2d\u95f4\u4ef6 cors(req, res, (result) =&gt; { \/\/ \u5904\u7406\u7ed3\u679c if (result instanceof Error) { res.status(500).end(); return; } \/\/ \u6b63\u5e38\u5904\u7406\u8bf7\u6c42 }); }<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>6. \u30a8\u30e9\u30fc\u51e6\u7406<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>try-catch \u30d6\u30ed\u30c3\u30af\u3092\u4f7f\u7528\u3057\u3066\u3001\u767a\u751f\u3059\u308b\u53ef\u80fd\u6027\u306e\u3042\u308b\u30a8\u30e9\u30fc\u3092\u51e6\u7406\u3057\u3001\u9069\u5207\u306a\u30a8\u30e9\u30fc\u5fdc\u7b54\u3092\u8fd4\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<code>export default function handler(req, res) { try { \/\/ \u5904\u7406\u8bf7\u6c42 } catch (error) { res.status(500).json({ error: 'An unexpected error occurred' }); } }<\/code><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8981<\/h3>\n\n\n\n<p>\u6b21\u306b.js\u306eAPI\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306f\u3001\u30ab\u30b9\u30bf\u30e0API\u3092\u69cb\u7bc9\u304a\u3088\u3073\u7ba1\u7406\u3059\u308b\u305f\u3081\u306e\u30b7\u30f3\u30d7\u30eb\u3067\u3042\u308a\u306a\u304c\u3089\u5f37\u529b\u306a\u65b9\u6cd5\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002 \u57fa\u672c\u7684\u306a\u6982\u5ff5\u3068\u9ad8\u5ea6\u306a\u6a5f\u80fd\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u3001\u3055\u307e\u3056\u307e\u306a\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u306b\u9069\u5fdc\u3059\u308b\u52b9\u7387\u7684\u3067\u4fdd\u5b88\u53ef\u80fd\u306aAPI\u3092\u69cb\u7bc9\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u3053\u308c\u3089\u306e\u6982\u5ff5\u3092\u5b9f\u7528\u7684\u306a\u4f8b\u3067\u793a\u3059\u3053\u3068\u304c\u3067\u304d\u3001\u7d71\u5408\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3001\u8a8d\u8a3c\u306a\u3069\u306e\u3088\u308a\u9ad8\u5ea6\u306a\u30c8\u30d4\u30c3\u30af\u3092\u542b\u3081\u3066\u3001\u6b21\u306e.js\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067API\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\u3092\u3088\u308a\u5b8c\u5168\u306b\u7406\u89e3\u3059\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/chat.openai.com\/_next\/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAAcHTtdQvKTfcfwR0bXrfLjIN0Vmoln5pVObYXE2hRFieJsISok%3Ds96-c&amp;w=96&amp;q=75\" alt=\"User\"\/><\/figure>\n\n\n\n<p>API\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0API\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u51e6\u7406ChatGPT\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<p>\u3082\u3061\u308d\u3093\u3001\u6b21\u306e.js\u3067API\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u304c\u3069\u306e\u3088\u3046\u306b\u51e6\u7406\u3055\u308c\u308b\u304b\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002 \u3053\u306e\u90e8\u5206\u306f\u3001API\u306e\u3055\u307e\u3056\u307e\u306a\u90e8\u5206\u3068\u6a5f\u80fd\u3092\u7ba1\u7406\u304a\u3088\u3073\u6574\u7406\u3059\u308b\u65b9\u6cd5\u3092\u542b\u3080\u305f\u3081\u3001\u91cd\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">API \u30eb\u30fc\u30c6\u30a3\u30f3\u30b0: API \u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u51e6\u7406<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>1.HTTP\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>API\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306f\u3001\u3055\u307e\u3056\u307e\u306aHTTP\u30e1\u30bd\u30c3\u30c9(GET\u3001POST\u3001PUT\u3001DELETE\u306a\u3069)\u306b\u5f93\u3063\u3066\u51e6\u7406\u3067\u304d\u307e\u3059\u3002 \u5404\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u901a\u5e38\u3001\u30ea\u30bd\u30fc\u30b9\u306e\u53d6\u5f97\u3001\u4f5c\u6210\u3001\u66f4\u65b0\u3001\u524a\u9664\u306a\u3069\u306e\u7279\u5b9a\u306e\u64cd\u4f5c\u306b\u5bfe\u5fdc\u3057\u307e\u3059\u3002 \u30b8\u30e3\u30d0\u30b9\u30af\u30ea\u30d7\u30c8\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30fc<code>export default function handler(req, res) { if (req.method === 'GET') { \/\/ \u5904\u7406GET\u8bf7\u6c42 } else if (req.method === 'POST') { \/\/ \u5904\u7406POST\u8bf7\u6c42 } \/\/ ... }<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>2. \u8981\u6c42\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3068\u30af\u30a8\u30ea \u30d1\u30e9\u30e1\u30fc\u30bf\u30fc<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u8981\u6c42\u30d1\u30b9\u5185\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306b\u306f\u53d6\u5f97\u3059\u308b\u3053\u3068\u3067\u30a2\u30af\u30bb\u30b9\u3067\u304d\u3001\u30af\u30a8\u30ea\u6587\u5b57\u5217\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306b\u3082\u540c\u3058\u65b9\u6cd5\u3067\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002 \u30b8\u30e3\u30d0\u30b9\u30af\u30ea\u30d7\u30c8\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30fc<code>req.query<\/code><code>\/\/ \u5bf9\u5e94\/pages\/api\/user\/[id].js export default function handler(req, res) { const { id } = req.query; \/\/ \u4f7f\u7528id\u5904\u7406\u8bf7\u6c42 }<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>3. \u8981\u6c42\u672c\u6587\u306e\u89e3\u6790<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>POST \u8981\u6c42\u3068 PUT \u8981\u6c42\u306b\u306f\u3001\u901a\u5e38\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304c\u30b5\u30fc\u30d0\u30fc\u306b\u9001\u4fe1\u3059\u308b\u30c7\u30fc\u30bf\u3092\u542b\u3080\u8981\u6c42\u672c\u6587\u304c\u542b\u307e\u308c\u307e\u3059\u3002 \u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3092\u4f7f\u7528\u3057\u3066\u8981\u6c42\u672c\u6587\u3092\u89e3\u6790\u3067\u304d\u307e\u3059\u3002 \u30b8\u30e3\u30d0\u30b9\u30af\u30ea\u30d7\u30c8\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30fc<code>export default function handler(req, res) { const data = req.body; \/\/ \u4f7f\u7528\u8bf7\u6c42\u4f53\u6570\u636e }<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>4. \u8fd4\u4fe1\u3092\u9001\u4fe1\u3059\u308b<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u9001\u4fe1\u3055\u308c\u308b\u5fdc\u7b54\u3092\u5236\u5fa1\u3067\u304d\u307e\u3059\u3002 \u3053\u308c\u306b\u306f\u3001\u72b6\u614b\u30b3\u30fc\u30c9\u3001\u5fdc\u7b54\u30d8\u30c3\u30c0\u30fc\u3001\u304a\u3088\u3073\u5fdc\u7b54\u672c\u6587\u306e\u8a2d\u5b9a\u304c\u542b\u307e\u308c\u307e\u3059\u3002 \u30b8\u30e3\u30d0\u30b9\u30af\u30ea\u30d7\u30c8\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30fc<code>res<\/code><code>res.status(200).json({ message: 'Success' });<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>5.\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3092\u4f7f\u7528\u3059\u308b<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306f\u3001\u8981\u6c42\u306e\u51e6\u7406\u3068\u5fdc\u7b54\u306e\u9001\u4fe1\u306e\u9593\u3067\u7279\u5b9a\u306e\u30ed\u30b8\u30c3\u30af\u3092\u5b9f\u884c\u3059\u308b\u518d\u5229\u7528\u53ef\u80fd\u306a\u95a2\u6570\u3067\u3059\u3002 \u30b8\u30e3\u30d0\u30b9\u30af\u30ea\u30d7\u30c8\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30fc<code>import Cors from 'cors'; const cors = Cors({ methods: ['GET', 'HEAD'], }); export default function handler(req, res) { cors(req, res, (result) =&gt; { \/\/ \u540e\u7eed\u5904\u7406 }); }<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>6. \u30a8\u30e9\u30fc\u51e6\u7406<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u9069\u5207\u306a\u30a8\u30e9\u30fc\u51e6\u7406\u306b\u3088\u308a\u3001\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u3068\u304d\u306b\u9069\u5207\u306a\u5fdc\u7b54\u3092\u78ba\u5b9f\u306b\u9001\u4fe1\u3067\u304d\u307e\u3059\u3002 \u30b8\u30e3\u30d0\u30b9\u30af\u30ea\u30d7\u30c8\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30fc<code>export default function handler(req, res) { try { \/\/ \u5904\u7406\u8bf7\u6c42 } catch (error) { res.status(500).json({ error: 'An unexpected error occurred' }); } }<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>7. API \u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3068\u5916\u90e8\u30c7\u30fc\u30bf<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3001\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3 API\u3001\u307e\u305f\u306f\u305d\u306e\u4ed6\u306e\u5916\u90e8\u30ea\u30bd\u30fc\u30b9\u3092\u64cd\u4f5c\u3057\u3066\u3001\u8981\u6c42\u306b\u5fdc\u7b54\u3067\u304d\u307e\u3059\u3002 \u30b8\u30e3\u30d0\u30b9\u30af\u30ea\u30d7\u30c8\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30fc<code>import db from 'db'; export default async function handler(req, res) { const users = await db.query('SELECT * FROM users'); res.json(users); }<\/code><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8981<\/h3>\n\n\n\n<p>\u6b21\u306b.js\u306eAPI\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u8c4a\u5bcc\u306a\u6a5f\u80fd\u30bb\u30c3\u30c8\u3092\u5099\u3048\u305f\u5f37\u529b\u306a\u30ab\u30b9\u30bf\u30e0API\u3092\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u57fa\u672c\u6982\u5ff5\u3068\u9ad8\u5ea6\u306a\u6982\u5ff5\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u52b9\u7387\u7684\u3067\u4fdd\u5b88\u53ef\u80fd\u306a API \u3092\u69cb\u7bc9\u3059\u308b\u305f\u3081\u306e\u30c4\u30fc\u30eb\u304c\u63d0\u4f9b\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u3053\u308c\u3089\u306e\u6982\u5ff5\u3092\u5b9f\u969b\u306e\u4f8b\u3067\u793a\u3057\u3001\u7406\u89e3\u3092\u6df1\u3081\u3001\u5b66\u3093\u3060\u3053\u3068\u3092\u5f37\u5316\u3059\u308b\u305f\u3081\u306b\u3001\u8996\u8074\u8005\u306b\u81ea\u5206\u3067\u7df4\u7fd2\u3059\u308b\u3088\u3046\u306b\u4fc3\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/chat.openai.com\/_next\/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAAcHTtdQvKTfcfwR0bXrfLjIN0Vmoln5pVObYXE2hRFieJsISok%3Ds96-c&amp;w=96&amp;q=75\" alt=\"User\"\/><\/figure>\n\n\n\n<p>\u5916\u90e8API\u3068ChatGPT\u306e\u7d71\u5408\u306eAPI\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<p>\u5916\u90e8API\u306e\u7d71\u5408\u306f\u3001\u6c17\u8c61\u60c5\u5831\u306e\u53d6\u5f97\u3001\u30bd\u30fc\u30b7\u30e3\u30eb\u30e1\u30c7\u30a3\u30a2\u30c7\u30fc\u30bf\u3078\u306e\u30a2\u30af\u30bb\u30b9\u3001\u652f\u6255\u3044\u51e6\u7406\u696d\u8005\u3068\u306e\u901a\u4fe1\u306a\u3069\u3001\u591a\u304f\u306e\u6700\u65b0\u306eWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u5171\u901a\u306e\u8981\u4ef6\u3067\u3059\u3002 Next.js \u306e\u5916\u90e8 API \u3068\u306e\u7d71\u5408\u306f\u8907\u96d1\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001IT \u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb \u30d3\u30c7\u30aa\u306b\u4f7f\u7528\u3067\u304d\u308b\u8a73\u7d30\u306a\u8aac\u660e\u3068\u624b\u9806\u3092\u6b21\u306b\u793a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">API \u30eb\u30fc\u30c6\u30a3\u30f3\u30b0: \u5916\u90e8 API \u306e\u7d71\u5408<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>1. \u5916\u90e8 API \u3092\u7d71\u5408\u3059\u308b\u7406\u7531<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5916\u90e8 API \u7d71\u5408\u306b\u3088\u308a\u3001\u30a2\u30d7\u30ea\u306f\u4ed6\u306e\u30b5\u30fc\u30d3\u30b9\u306e\u30c7\u30fc\u30bf\u3084\u6a5f\u80fd\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u6d3b\u7528\u3067\u304d\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u3053\u308c\u306b\u3088\u308a\u3001\u5929\u6c17 API \u3092\u4f7f\u7528\u3057\u305f\u5929\u6c17\u60c5\u5831\u306e\u53d6\u5f97\u3084\u3001\u652f\u6255\u3044 API \u3092\u4f7f\u7528\u3057\u305f\u652f\u6255\u3044\u306e\u51e6\u7406\u306a\u3069\u3001\u30a2\u30d7\u30ea\u306e\u6a5f\u80fd\u3092\u5f37\u5316\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>2.\u9069\u5207\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u9078\u629e\u3059\u308b\u65b9\u6cd5<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5916\u90e8 API \u3068\u306e\u5bfe\u8a71\u306b\u306f\u3001\u591a\u304f\u306e\u5834\u5408\u3001HTTP \u8981\u6c42\u304c\u5fc5\u8981\u3067\u3059\u3002 \u3001\u306a\u3069\u3001\u3053\u306e\u76ee\u7684\u306b\u4f7f\u7528\u3067\u304d\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u306f\u591a\u6570\u3042\u308a\u307e\u3059\u3002<code>axios<\/code><code>fetch<\/code><\/li>\n\n\n\n<li>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u9069\u3057\u305f\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u9078\u629e\u3057\u307e\u3059\u3002 \u305f\u3068\u3048\u3070\u3001\u7d44\u307f\u8fbc\u307f\u307e\u305f\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<code>fetch<\/code><code>axios<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>3. API \u8981\u6c42\u3092\u4f5c\u6210\u3059\u308b<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u8981\u6c42\u306f\u3001\u5916\u90e8 API \u306e\u8981\u4ef6\u306b\u6e96\u62e0\u3059\u308b\u3088\u3046\u306b\u69cb\u7bc9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u308c\u306b\u306f\u3001\u6b63\u3057\u3044 HTTP \u30e1\u30bd\u30c3\u30c9\u3001\u8981\u6c42\u30d8\u30c3\u30c0\u30fc (\u8a8d\u8a3c\u60c5\u5831\u306a\u3069)\u3001\u304a\u3088\u3073\u8981\u6c42\u672c\u6587\u306e\u8a2d\u5b9a\u304c\u542b\u307e\u308c\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 \u30b8\u30e3\u30d0\u30b9\u30af\u30ea\u30d7\u30c8\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30fc<code>import axios from 'axios'; const response = await axios.get('https:\/\/api.example.com\/data', { headers: { Authorization: 'Bearer YOUR_TOKEN' } });<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>4. \u5fdc\u7b54\u3092\u51e6\u7406\u3059\u308b<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5916\u90e8 API \u304b\u3089\u306e\u5fdc\u7b54\u3067\u306f\u3001\u30a2\u30d7\u30ea\u306e\u4f7f\u7528\u306b\u9069\u3057\u305f\u51e6\u7406\u304c\u5fc5\u8981\u306b\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u5fdc\u7b54\u72b6\u614b\u30b3\u30fc\u30c9\u3092\u78ba\u8a8d\u3057\u3001\u5fdc\u7b54\u672c\u6587\u3092\u89e3\u6790\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 \u30b8\u30e3\u30d0\u30b9\u30af\u30ea\u30d7\u30c8\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30fc<code>if (response.status === 200) { const data = response.data; \/\/ \u4f7f\u7528\u6570\u636e } else { \/\/ \u5904\u7406\u9519\u8bef }<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>5. \u30a8\u30e9\u30fc\u51e6\u7406<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5916\u90e8 API \u3068\u306e\u5bfe\u8a71\u306f\u3046\u307e\u304f\u3044\u304b\u306a\u3044\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u30a8\u30e9\u30fc\u306f\u9069\u5207\u306b\u51e6\u7406\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u3053\u308c\u306b\u306f\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a8\u30e9\u30fc\u3001\u5916\u90e8API\u306b\u3088\u3063\u3066\u8fd4\u3055\u308c\u308b\u30a8\u30e9\u30fc\u30b9\u30c6\u30fc\u30bf\u30b9\u30b3\u30fc\u30c9\u306a\u3069\u304c\u542b\u307e\u308c\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 \u30b8\u30e3\u30d0\u30b9\u30af\u30ea\u30d7\u30c8\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30fc<code>try { const response = await axios.get('https:\/\/api.example.com\/data'); \/\/ \u5904\u7406\u54cd\u5e94 } catch (error) { \/\/ \u5904\u7406\u9519\u8bef }<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>6. \u6b21\u3078.js API \u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3067\u4f7f\u7528<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5916\u90e8 API \u547c\u3073\u51fa\u3057\u3092\u6b21\u306e.js\u306e API \u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306b\u7d71\u5408\u3057\u3001\u30c7\u30fc\u30bf\u3092\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u306b\u8ee2\u9001\u3057\u305f\u308a\u3001\u4ed6\u306e\u30ed\u30b8\u30c3\u30af\u3092\u5b9f\u884c\u3057\u305f\u308a\u3067\u304d\u307e\u3059\u3002 \u30b8\u30e3\u30d0\u30b9\u30af\u30ea\u30d7\u30c8\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30fc<code>\/\/ pages\/api\/weather.js export default async (req, res) =&gt; { try { const response = await axios.get('https:\/\/api.weather.com\/current'); res.status(200).json(response.data); } catch (error) { res.status(500).json({ error: 'Failed to fetch weather data' }); } };<\/code><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8981<\/h3>\n\n\n\n<p>\u6b21\u306b.js\u5916\u90e8 API \u306e\u7d71\u5408\u304c\u975e\u5e38\u306b\u7c21\u5358\u306b\u306a\u308a\u307e\u3059\u3002 \u8981\u6c42\u306e\u69cb\u7bc9\u65b9\u6cd5\u3001\u5fdc\u7b54\u3001\u304a\u3088\u3073\u30a8\u30e9\u30fc\u306e\u51e6\u7406\u65b9\u6cd5\u3092\u7406\u89e3\u3059\u308b\u3053\u3068\u306f\u3001\u5805\u7262\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u69cb\u7bc9\u3059\u308b\u4e0a\u3067\u91cd\u8981\u306a\u90e8\u5206\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u3053\u308c\u3089\u306e\u6982\u5ff5\u3092 1 \u3064\u4ee5\u4e0a\u306e\u5177\u4f53\u7684\u306a\u4f8b\u3067\u793a\u3057\u3001\u3055\u307e\u3056\u307e\u306a\u7a2e\u985e\u306e API \u306e\u76f8\u4e92\u4f5c\u7528\u3068\u3001\u8a8d\u8a3c\u3001\u30da\u30fc\u30b8\u30cd\u30fc\u30b7\u30e7\u30f3\u306a\u3069\u306e\u4e00\u822c\u7684\u306a\u8ab2\u984c\u3092\u78ba\u5b9f\u306b\u30ab\u30d0\u30fc\u3057\u3001\u8996\u8074\u8005\u304c\u81ea\u5206\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u5916\u90e8 API \u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\u3092\u3088\u308a\u3088\u304f\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/chat.openai.com\/_next\/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAAcHTtdQvKTfcfwR0bXrfLjIN0Vmoln5pVObYXE2hRFieJsISok%3Ds96-c&amp;w=96&amp;q=75\" alt=\"User\"\/><\/figure>\n\n\n\n<p>ChatGPT\u3092\u6700\u9069\u5316\u304a\u3088\u3073\u5c55\u958b\u3059\u308b\u305f\u3081\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6700\u9069\u5316\u306e\u30d2\u30f3\u30c8\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<p>\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u6700\u9069\u5316\u306f\u3001Next.js \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u69cb\u7bc9\u304a\u3088\u3073\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u969b\u306e\u91cd\u8981\u306a\u8981\u7d20\u3067\u3059\u3002 \u30e6\u30fc\u30b6\u30fc\u30a8\u30af\u30b9\u30da\u30ea\u30a8\u30f3\u30b9\u3092\u5411\u4e0a\u3055\u305b\u308b\u3060\u3051\u3067\u306a\u304f\u3001\u691c\u7d22\u30a8\u30f3\u30b8\u30f3\u306e\u30e9\u30f3\u30ad\u30f3\u30b0\u3092\u5411\u4e0a\u3055\u305b\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002 IT\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u30d3\u30c7\u30aa\u306eNext.js\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6700\u9069\u5316\u306b\u95a2\u3059\u308b\u8a73\u7d30\u306a\u8aac\u660e\u3068\u30d2\u30f3\u30c8\u3092\u6b21\u306b\u793a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6700\u9069\u5316\u3068\u30c7\u30d7\u30ed\u30a4: \u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6700\u9069\u5316\u306e\u30d2\u30f3\u30c8<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>1. \u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0(SSR)\u3068\u9759\u7684\u30b5\u30a4\u30c8\u751f\u6210(SSG)<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Next.js\u306eSSR\u304a\u3088\u3073SSG\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u30da\u30fc\u30b8\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u4e8b\u524d\u306b\u751f\u6210\u3057\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u306e\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u306e\u8ca0\u62c5\u3092\u8efd\u6e1b\u3067\u304d\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u3001\u9069\u5207\u306a\u4f7f\u7528\u65b9\u6cd5\u3068\u9069\u5207\u306a\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u65b9\u6cd5\u3092\u9078\u629e\u3067\u304d\u307e\u3059\u3002<code>getStaticProps<\/code><code>getServerSideProps<\/code><code>getStaticPaths<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>2.\u753b\u50cf\u306e\u6700\u9069\u5316<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Next.js \u306e\u7d44\u307f\u8fbc\u307f\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3001\u753b\u50cf\u30b5\u30a4\u30ba\u3068\u66f8\u5f0f\u8a2d\u5b9a\u3092\u81ea\u52d5\u7684\u306b\u6700\u9069\u5316\u3057\u307e\u3059\u3002<code>Image<\/code><\/li>\n\n\n\n<li>\u3053\u308c\u306b\u3088\u308a\u3001\u8aad\u307f\u8fbc\u307f\u6642\u9593\u304c\u77ed\u7e2e\u3055\u308c\u3001\u30da\u30fc\u30b8\u901f\u5ea6\u304c\u5411\u4e0a\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>3.\u30b3\u30fc\u30c9\u5206\u5272\u3068\u9045\u5ef6\u8aad\u307f\u8fbc\u307f<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6b21\u306b.js\u5404\u30da\u30fc\u30b8\u306e\u30b3\u30fc\u30c9\u3092\u500b\u5225\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u81ea\u52d5\u7684\u306b\u5206\u5272\u3057\u3001\u30d5\u30a9\u30fc\u30eb\u30c9\u306e\u8aad\u307f\u8fbc\u307f\u6642\u9593\u3092\u77ed\u7e2e\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>React\u306e\u5408\u8a08\u3092\u4f7f\u7528\u3057\u3066\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u30ec\u30d9\u30eb\u306e\u9045\u5ef6\u8aad\u307f\u8fbc\u307f\u3092\u3055\u3089\u306b\u5b9f\u88c5\u3067\u304d\u307e\u3059\u3002<code>Suspense<\/code><code>lazy<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>4.\u4e0d\u8981\u306a\u518d\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3092\u907f\u3051\u308b<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>React\u306esum\u3084\u305d\u306e\u4ed6\u306e\u30d5\u30c3\u30af\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u4e0d\u8981\u306a\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u518d\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3092\u56de\u907f\u3067\u304d\u307e\u3059\u3002<code>memo<\/code><code>useMemo<\/code><\/li>\n\n\n\n<li>\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u72b6\u614b\u3068\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u9069\u5207\u306b\u7ba1\u7406\u3059\u308b\u3053\u3068\u3067\u3001\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u306e\u52b9\u7387\u3092\u5411\u4e0a\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>5.CDN\u3092\u4f7f\u7528\u3057\u307e\u3059<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u5c55\u958b\u3059\u308b\u5834\u5408\u3001\u30b3\u30f3\u30c6\u30f3\u30c4\u914d\u4fe1\u30cd\u30c3\u30c8\u30ef\u30fc\u30af (CDN) \u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u4e16\u754c\u4e2d\u306e\u8907\u6570\u306e\u5834\u6240\u306b\u30ea\u30bd\u30fc\u30b9\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3067\u304d\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u3053\u308c\u306b\u3088\u308a\u3001\u5f85\u6a5f\u6642\u9593\u304c\u77ed\u7e2e\u3055\u308c\u3001\u30e6\u30fc\u30b6\u30fc\u306f\u30ea\u30bd\u30fc\u30b9\u306b\u3059\u3070\u3084\u304f\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>6.\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u6700\u9069\u5316\u3059\u308b<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u5206\u6790\u304a\u3088\u3073\u30ec\u30d3\u30e5\u30fc\u3057\u3066\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306b\u60aa\u5f71\u97ff\u3092\u53ca\u307c\u3055\u306a\u3044\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>Webpack\u306e\u30c4\u30ea\u30fc\u30b7\u30a7\u30a4\u30ad\u30f3\u30b0\u306a\u3069\u306e\u6700\u9069\u5316\u624b\u6cd5\u3092\u4f7f\u7528\u3057\u3066\u3001\u672a\u4f7f\u7528\u306e\u30b3\u30fc\u30c9\u3092\u6392\u9664\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>7.\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068API\u547c\u3073\u51fa\u3057\u3092\u6700\u9069\u5316\u3059\u308b<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30a8\u30ea\u3068API\u30b3\u30fc\u30eb\u3092\u6700\u9069\u5316\u3057\u3066\u3001\u30b5\u30fc\u30d0\u30fc\u306e\u5fdc\u7b54\u6642\u9593\u3092\u6700\u5c0f\u9650\u306b\u6291\u3048\u307e\u3059\u3002<\/li>\n\n\n\n<li>N+1 \u30af\u30a8\u30ea\u306e\u554f\u984c\u3092\u56de\u907f\u3057\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u4f7f\u7528\u3057\u3066\u91cd\u8907\u547c\u3073\u51fa\u3057\u3092\u6e1b\u3089\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>8.\u30d6\u30e9\u30a6\u30b6\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u4f7f\u7528\u3059\u308b<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u9069\u5207\u306a\u30ad\u30e3\u30c3\u30b7\u30e5\u5236\u5fa1\u30d8\u30c3\u30c0\u30fc\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001\u30d6\u30e9\u30a6\u30b6\u30fc\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u5229\u7528\u3057\u3066\u9759\u7684\u30ea\u30bd\u30fc\u30b9\u3092\u683c\u7d0d\u3067\u304d\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u3053\u308c\u306b\u3088\u308a\u3001\u540c\u3058\u30ea\u30bd\u30fc\u30b9\u3092\u7e70\u308a\u8fd4\u3057\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u5fc5\u8981\u304c\u5c11\u306a\u304f\u306a\u308a\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>9.\u30d7\u30ed\u30d5\u30a1\u30a4\u30ea\u30f3\u30b0\u30c4\u30fc\u30eb\u3092\u4f7f\u7528\u3059\u308b<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Lighthouse \u3084 WebPageTest \u306a\u3069\u306e\u30c4\u30fc\u30eb\u3092\u5b9a\u671f\u7684\u306b\u4f7f\u7528\u3057\u3066\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u5206\u6790\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u30dc\u30c8\u30eb\u30cd\u30c3\u30af\u3092\u76e3\u8996\u304a\u3088\u3073\u8a3a\u65ad\u3057\u3001\u9069\u5207\u306a\u6700\u9069\u5316\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8981<\/h3>\n\n\n\n<p>\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u6700\u9069\u5316\u306f\u3001\u3055\u307e\u3056\u307e\u306a\u30ec\u30a4\u30e4\u30fc\u3068\u30c6\u30af\u30ce\u30ed\u30b8\u3092\u542b\u3080\u7d99\u7d9a\u7684\u306a\u30d7\u30ed\u30bb\u30b9\u3067\u3059\u3002 \u30b3\u30fc\u30c9\u306e\u69cb\u9020\u3068\u7de8\u6210\u304b\u3089\u30c7\u30d7\u30ed\u30a4\u3068\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u307e\u3067\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306b\u95a2\u3059\u308b\u8003\u616e\u4e8b\u9805\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u3053\u308c\u3089\u306e\u624b\u6cd5\u3092 1 \u3064\u305a\u3064\u8a73\u7d30\u306b\u8aac\u660e\u304a\u3088\u3073\u30c7\u30e2\u30f3\u30b9\u30c8\u30ec\u30fc\u30b7\u30e7\u30f3\u3057\u3001\u5b9f\u7528\u7684\u306a\u30b3\u30fc\u30c9 \u30b5\u30f3\u30d7\u30eb\u3092\u63d0\u4f9b\u3057\u3066\u3001\u8074\u8846\u306b\u72ec\u81ea\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u7df4\u7fd2\u3057\u3066\u6700\u9069\u5316\u3059\u308b\u3088\u3046\u306b\u4fc3\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3059\u3079\u3066\u306e\u6700\u9069\u5316\u304c\u3059\u3079\u3066\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u9069\u7528\u3055\u308c\u308b\u308f\u3051\u3067\u306f\u306a\u3044\u305f\u3081\u3001\u5404\u624b\u6cd5\u304c\u9069\u7528\u3055\u308c\u308b\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3092\u7406\u89e3\u3057\u3001\u9069\u5207\u306a\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3067\u9069\u7528\u3059\u308b\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/chat.openai.com\/_next\/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAAcHTtdQvKTfcfwR0bXrfLjIN0Vmoln5pVObYXE2hRFieJsISok%3Ds96-c&amp;w=96&amp;q=75\" alt=\"User\"\/><\/figure>\n\n\n\n<p>ChatGPT\u306e\u9759\u7684\u751f\u6210\u3068\u30b5\u30fc\u30d0\u30fc\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u306e\u6bd4\u8f03\u306e\u6700\u9069\u5316\u3068\u5c55\u958b\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<p>\u6b21\u306b.js\u9759\u7684\u30b5\u30a4\u30c8\u751f\u6210 (SSG) \u3068\u30b5\u30fc\u30d0\u30fc\u5074\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0 (SSR) \u3068\u3044\u3046 2 \u3064\u306e\u4e3b\u8981\u306a\u30da\u30fc\u30b8 \u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u65b9\u6cd5\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002 IT\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u30d3\u30c7\u30aa\u306b\u9069\u7528\u3067\u304d\u308b\u3053\u308c\u30892\u3064\u306e\u65b9\u6cd5\u306e\u8a73\u7d30\u306a\u6bd4\u8f03\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6700\u9069\u5316\u3068\u5c55\u958b: \u9759\u7684\u751f\u6210\u3068\u30b5\u30fc\u30d0\u30fc \u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u306e\u6bd4\u8f03<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">\u30b9\u30bf\u30c6\u30a3\u30c3\u30af\u751f\u6210 (SSG)<\/h4>\n\n\n\n<p><strong>\u4fa1\u5024\uff1a<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u9ad8\u901f:<\/strong>&nbsp;\u30da\u30fc\u30b8\u306f\u30d3\u30eb\u30c9\u6642\u306b\u751f\u6210\u3055\u308c\u308b\u305f\u3081\u3001\u30b5\u30fc\u30d0\u30fc\u306f\u4e8b\u524d\u306b\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3055\u308c\u305f HTML \u30d5\u30a1\u30a4\u30eb\u306e\u307f\u3092\u63d0\u4f9b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u308c\u306b\u3088\u308a\u3001\u30b5\u30fc\u30d0\u30fc\u306e\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u6642\u9593\u304c\u306a\u304f\u306a\u308a\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u62e1\u5f35\u6027:<\/strong>\u30da\u30fc\u30b8\u306f\u4e8b\u524d\u306b\u69cb\u7bc9\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001CDN\u3092\u4ecb\u3057\u3066\u7c21\u5358\u306b\u30ad\u30e3\u30c3\u30b7\u30e5\u304a\u3088\u3073\u914d\u5e03\u3067\u304d\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u4f4e<\/strong>\u30b5\u30fc\u30d0\u30fc\u8ca0\u8377: \u30b5\u30fc\u30d0\u30fc\u306f\u8981\u6c42\u3054\u3068\u306b\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3059\u308b\u5fc5\u8981\u304c\u306a\u3044\u305f\u3081\u3001\u8ca0\u8377\u304c\u8efd\u6e1b\u3055\u308c\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>SEO\u30d5\u30ec\u30f3\u30c9\u30ea\u30fc:<\/strong>\u4e8b\u524d\u306b\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3055\u308c\u305f\u30da\u30fc\u30b8\u306f\u3001\u691c\u7d22\u30a8\u30f3\u30b8\u30f3\u304c\u7c21\u5358\u306b\u30af\u30ed\u30fc\u30eb\u3057\u3066\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u767b\u9332\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ol>\n\n\n\n<p><strong>\u77ed\u6240\uff1a<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u66f4\u65b0\u306e\u9045\u5ef6:<\/strong>&nbsp;\u30b3\u30f3\u30c6\u30f3\u30c4\u304c\u5909\u66f4\u3055\u308c\u305f\u5834\u5408\u306f\u3001\u30b5\u30a4\u30c8\u5168\u4f53\u3092\u518d\u69cb\u7bc9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30c7\u30fc\u30bf\u306b\u306f\u9069\u3057\u3066\u3044\u307e\u305b\u3093:<\/strong>\u30da\u30fc\u30b8\u304c\u983b\u7e41\u306b\u66f4\u65b0\u3055\u308c\u308b\u30c7\u30fc\u30bf\u306b\u4f9d\u5b58\u3057\u3066\u3044\u308b\u5834\u5408\u3001SSG\u306f\u6700\u826f\u306e\u9078\u629e\u3067\u306f\u306a\u3044\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n<\/ol>\n\n\n\n<p><strong>\u76ee\u7684:<\/strong>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30b5\u30a4\u30c8\u3001\u30d6\u30ed\u30b0\u3001\u30b3\u30f3\u30c6\u30f3\u30c4\u99c6\u52d5\u578bWeb\u30b5\u30a4\u30c8\u306a\u3069\u3002<\/p>\n\n\n\n<p><strong>\u6b21\u3078.js \u6a5f\u80fd:<\/strong>\u9759\u7684\u751f\u6210\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002<code>getStaticProps<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u30b5\u30fc\u30d0\u30fc \u30ec\u30f3\u30c0\u30ea\u30f3\u30b0 (SSR)<\/h4>\n\n\n\n<p><strong>\u4fa1\u5024\uff1a<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30c7\u30fc\u30bf:<\/strong>\u30b5\u30fc\u30d0\u30fc\u306f\u30ea\u30af\u30a8\u30b9\u30c8\u3054\u3068\u306b\u30da\u30fc\u30b8\u3092\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3059\u308b\u305f\u3081\u3001\u6700\u65b0\u306e\u30c7\u30fc\u30bf\u3092\u8868\u793a\u3067\u304d\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u30d1\u30fc\u30bd\u30ca\u30e9\u30a4\u30ba\u3055\u308c\u305f\u30b3\u30f3\u30c6\u30f3\u30c4: \u30d1\u30fc\u30bd\u30ca\u30e9\u30a4\u30ba\u3055\u308c\u305f\u30b3\u30f3\u30c6\u30f3\u30c4\u306f<\/strong>\u3001\u30e6\u30fc\u30b6\u30fc\u60c5\u5831\u307e\u305f\u306f\u30bb\u30c3\u30b7\u30e7\u30f3\u30c7\u30fc\u30bf\u306b\u57fa\u3065\u3044\u3066\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3067\u304d\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>SEO\u30d5\u30ec\u30f3\u30c9\u30ea\u30fc:<\/strong>SSG\u3068\u540c\u69d8\u306b\u3001SSR\u3067\u751f\u6210\u3055\u308c\u305f\u30da\u30fc\u30b8\u3082\u691c\u7d22\u30a8\u30f3\u30b8\u30f3\u3067\u30af\u30ed\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ol>\n\n\n\n<p><strong>\u77ed\u6240\uff1a<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u30b5\u30fc\u30d0\u30fc\u306e\u8ca0\u8377:<\/strong>&nbsp;\u5404\u8981\u6c42\u306b\u306f\u30b5\u30fc\u30d0\u30fc \u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u304c\u5fc5\u8981\u3067\u3042\u308a\u3001\u30b5\u30fc\u30d0\u30fc\u306e\u8ca0\u8377\u304c\u5897\u52a0\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u9045\u304f<strong>\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b<\/strong>: \u5404\u8981\u6c42\u306f\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3092\u5fc5\u8981\u3068\u3059\u308b\u305f\u3081\u3001\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u304c\u591a\u3044\u5834\u5408\u3001SSR \u306f SSG \u306b\u6bd4\u3079\u3066\u9045\u304f\u898b\u3048\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n<\/ol>\n\n\n\n<p><strong>\u76ee\u7684:<\/strong>&nbsp;\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306e\u30c7\u30fc\u30bf\u99c6\u52d5\u578b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3001\u30d1\u30fc\u30bd\u30ca\u30e9\u30a4\u30ba\u3055\u308c\u305f\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u5fc5\u8981\u3068\u3059\u308b\u30b5\u30a4\u30c8\u306a\u3069\u3002<\/p>\n\n\n\n<p><strong>\u6b21\u3078.js \u95a2\u6570:<\/strong>&nbsp;\u30b5\u30fc\u30d0\u30fc \u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002<code>getServerSideProps<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8981<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u9759\u7684\u751f\u6210\u306f\u3001\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u5909\u66f4\u304c\u5c11\u306a\u3044\u3001\u307e\u305f\u306f\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0 \u30c7\u30fc\u30bf\u306b\u4f9d\u5b58\u3057\u306a\u3044\u30b7\u30ca\u30ea\u30aa\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/strong><\/li>\n\n\n\n<li><strong>\u30b5\u30fc\u30d0\u30fc \u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u306f\u3001\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0 \u30c7\u30fc\u30bf\u3084\u9ad8\u5ea6\u306b\u30d1\u30fc\u30bd\u30ca\u30e9\u30a4\u30ba\u3055\u308c\u305f\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u5fc5\u8981\u3068\u3059\u308b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u3002<\/strong><\/li>\n<\/ul>\n\n\n\n<p>\u3069\u3061\u3089\u306e\u65b9\u6cd5\u3092\u9078\u629e\u3059\u308b\u304b\u306f\u3001\u7279\u5b9a\u306e\u30cb\u30fc\u30ba\u3068\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u7a2e\u985e\u306b\u3088\u3063\u3066\u7570\u306a\u308a\u307e\u3059\u3002 \u591a\u304f\u306e\u5834\u5408\u3001\u540c\u3058\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067 2 \u3064\u306e\u65b9\u6cd5\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u3001\u5404\u30da\u30fc\u30b8\u306b\u6700\u9069\u306a\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3092\u9078\u629e\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u4f8b\u3068\u30c7\u30e2\u3092\u4f7f\u7528\u3057\u3066\u3001\u6b21\u306e.js\u3067\u4e21\u65b9\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u88c5\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u3001\u3069\u3061\u3089\u306e\u30e1\u30bd\u30c3\u30c9\u304c\u6700\u3082\u9069\u5207\u306a\u5834\u5408\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u3001\u8996\u8074\u8005\u304c\u81ea\u5206\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u6700\u826f\u306e\u9078\u629e\u3092\u3059\u308b\u65b9\u6cd5\u3092\u7406\u89e3\u3059\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/chat.openai.com\/_next\/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAAcHTtdQvKTfcfwR0bXrfLjIN0Vmoln5pVObYXE2hRFieJsISok%3Ds96-c&amp;w=96&amp;q=75\" alt=\"User\"\/><\/figure>\n\n\n\n<p>Vercel\u307e\u305f\u306f\u4ed6\u306e\u30db\u30b9\u30c6\u30a3\u30f3\u30b0\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0ChatGPT\u3078\u306e\u5c55\u958b\u306e\u6700\u9069\u5316\u3068\u5c55\u958b\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<p>Next .js\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u958b\u767a\u3057\u305f\u5f8c\u3001\u305d\u308c\u3092\u4fe1\u983c\u3067\u304d\u308b\u30db\u30b9\u30c6\u30a3\u30f3\u30b0\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306b\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u3053\u3068\u306f\u91cd\u8981\u306a\u30b9\u30c6\u30c3\u30d7\u3067\u3059\u3002 \u305d\u306e\u4e2d\u3067\u3001Vercel\u306fNext.js\u306e\u516c\u5f0f\u30db\u30b9\u30c6\u30a3\u30f3\u30b0\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067\u3042\u308a\u3001Next.js\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u7528\u306b\u6700\u9069\u5316\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u3055\u3089\u306b\u3001\u4ed6\u306e\u591a\u304f\u306e\u4eba\u6c17\u306e\u3042\u308b\u30db\u30b9\u30c6\u30a3\u30f3\u30b0\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3082\u9078\u629e\u3067\u304d\u307e\u3059\u3002 \u3053\u3053\u3067\u306f\u3001IT\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u30d3\u30c7\u30aa\u7528\u306eVercel\u3084\u305d\u306e\u4ed6\u306e\u30db\u30b9\u30c6\u30a3\u30f3\u30b0\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3078\u306e\u30c7\u30d7\u30ed\u30a4\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30f4\u30a7\u30eb\u30bb\u30eb\u3078\u306e\u30c7\u30d7\u30ed\u30a4<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">\u30b9\u30c6\u30c3\u30d7\u30b9\uff1a<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Vercel\u30a2\u30ab\u30a6\u30f3\u30c8<strong>\u3092\u4f5c\u6210\u3059\u308b<\/strong>:\u307e\u305a\u3001<a href=\"https:\/\/vercel.com\/\">Vercel\u306e\u516c\u5f0fWeb\u30b5\u30a4\u30c8\u306b\u30a2\u30af\u30bb\u30b9<\/a>\u3057\u3066\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u4f5c\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>Vercel CLI \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb (\u30aa\u30d7\u30b7\u30e7\u30f3): \u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3 \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9 (CLI<\/strong>) \u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u7ba1\u7406\u3068\u30c7\u30d7\u30ed\u30a4\u304c\u7c21\u5358\u306b\u306a\u308a\u307e\u3059\u3002 \u30d0\u30c3\u30b7\u30e5\u30b3\u30d4\u30fc\u30b3\u30fc\u30c9<code>npm install -g vercel<\/code><\/li>\n\n\n\n<li><strong>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u63a5\u7d9a:<\/strong>&nbsp;Vercel \u306e Web \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u307e\u305f\u306f CLI \u3092\u4f7f\u7528\u3057\u3066\u3001\u6b21\u306e.js\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092 Vercel \u30a2\u30ab\u30a6\u30f3\u30c8\u306b\u30ea\u30f3\u30af\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u5c55\u958b\u306e\u69cb\u6210: \u5c55\u958b<\/strong>\u306e\u69cb\u6210\u306f\u3001\u30d5\u30a1\u30a4\u30eb\u307e\u305f\u306f Vercel \u306e Web \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u4ecb\u3057\u3066\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<code>vercel.json<\/code><\/li>\n\n\n\n<li><strong>\u5c55\u958b\u306e\u958b\u59cb:<\/strong>&nbsp;CLI \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u304b\u3001Web \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u304b\u3089 [\u5c55\u958b] \u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<code>vercel<\/code><\/li>\n\n\n\n<li>\u30ab\u30b9\u30bf\u30e0 \u30c9\u30e1\u30a4\u30f3\u540d<strong>\u3092\u8a2d\u5b9a\u3059\u308b (\u30aa\u30d7\u30b7\u30e7\u30f3): \u5fc5\u8981\u306b\u5fdc\u3058\u3066\u3001\u30ab\u30b9\u30bf\u30e0 \u30c9\u30e1\u30a4\u30f3\u540d<\/strong>\u3092\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u95a2\u9023\u4ed8\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u81ea\u52d5\u30c7\u30d7\u30ed\u30a4\u3092\u304a\u697d\u3057\u307f\u304f\u3060\u3055\u3044:<\/strong>&nbsp;Vercel \u306f\u3001GitHub\u3001GitLab\u3001Bitbucket \u3068\u306e\u7d71\u5408\u3092\u63d0\u4f9b\u3057\u3001\u5404\u30b3\u30df\u30c3\u30c8\u5f8c\u306e\u81ea\u52d5\u30c7\u30d7\u30ed\u30a4\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002<\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\">\u5229\uff1a<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6b21\u306e.js\u306e\u305f\u3081\u306b\u7279\u5225\u306b\u6700\u9069\u5316<\/li>\n\n\n\n<li>\u7121\u6599\u306eSSL\u8a3c\u660e\u66f8<\/li>\n\n\n\n<li>\u30b7\u30fc\u30e0\u30ec\u30b9\u306a CI\/CD \u7d71\u5408<\/li>\n\n\n\n<li>\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u6a5f\u80fd<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u4ed6\u306e\u30db\u30b9\u30c6\u30a3\u30f3\u30b0\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3078\u306e\u30c7\u30d7\u30ed\u30a4<\/h3>\n\n\n\n<p>Netlify\u3001AWS Amplify\u3001Heroku\u306a\u3069\u3001Next.js\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3082\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u30db\u30b9\u30c6\u30a3\u30f3\u30b0\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306f\u4ed6\u306b\u3082\u305f\u304f\u3055\u3093\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Netlify\u306b\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u624b\u9806\u306e\u4f8b:<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Netlify\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u4f5c\u6210\u3057\u3066\u30ed\u30b0\u30a4\u30f3\u3057\u307e\u3059\u3002<\/strong><\/li>\n\n\n\n<li><strong>GitHub\u3001GitLab\u3001\u307e\u305f\u306f Bitbucket \u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u63a5\u7d9a\u3057\u307e\u3059\u3002<\/strong><\/li>\n\n\n\n<li><strong>[\u6b21\u3078.js \u30d7\u30ed\u30b8\u30a7\u30af\u30c8] \u3092\u9078\u629e\u3057\u3001\u30d3\u30eb\u30c9\u8a2d\u5b9a\u3092\u69cb\u6210\u3057\u307e\u3059\u3002<\/strong><\/li>\n\n\n\n<li><strong>[\u30c7\u30d7\u30ed\u30a4] \u3092\u30af\u30ea\u30c3\u30af\u3057\u3001\u30d3\u30eb\u30c9\u304c\u5b8c\u4e86\u3059\u308b\u307e\u3067\u5f85\u3061\u307e\u3059\u3002<\/strong><\/li>\n<\/ol>\n\n\n\n<p>\u4ed6\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u5c55\u958b\u30d7\u30ed\u30bb\u30b9\u306f\u82e5\u5e72\u7570\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u901a\u5e38\u3001\u6b21\u306e\u4e3b\u306a\u624b\u9806\u304c\u542b\u307e\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30db\u30b9\u30c6\u30a3\u30f3\u30b0\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u4f5c\u6210\u3059\u308b<\/li>\n\n\n\n<li>\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u63a5\u7d9a\u3059\u308b<\/li>\n\n\n\n<li>\u30d3\u30eb\u30c9\u3068\u914d\u7f6e\u306e\u8a2d\u5b9a\u3092\u69cb\u6210\u3059\u308b<\/li>\n\n\n\n<li>\u30c7\u30d7\u30ed\u30a4\u3092\u958b\u59cb\u3059\u308b<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8981<\/h3>\n\n\n\n<p>Next.js \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30c7\u30d7\u30ed\u30a4\u306f\u3001\u7279\u306b Vercel \u306a\u3069\u306e Next \u7528\u306b\u6700\u9069\u5316\u3055\u308c\u305f\u30de\u30cd\u30fc\u30b8\u30c9 \u30b5\u30fc\u30d3\u30b9\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408.js\u6bd4\u8f03\u7684\u7c21\u5358\u306a\u30d7\u30ed\u30bb\u30b9\u3067\u3059\u3002 \u305f\u3060\u3057\u3001\u5404\u30db\u30b9\u30c6\u30a3\u30f3\u30b0\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306b\u306f\u72ec\u81ea\u306e\u7279\u5b9a\u306e\u624b\u9806\u3068\u8981\u4ef6\u304c\u3042\u308b\u5834\u5408\u304c\u3042\u308b\u305f\u3081\u3001\u9078\u629e\u3057\u305f\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306b\u5fc5\u305a\u5f93\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p>\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u30d3\u30c7\u30aa\u3067\u306f\u3001\u5c55\u958b\u30d7\u30ed\u30bb\u30b9\u3092\u5b9f\u969b\u306b\u793a\u3057\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30cb\u30fc\u30ba\u306b\u6700\u3082\u9069\u3057\u305f\u30db\u30b9\u30c6\u30a3\u30f3\u30b0\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3092\u9078\u629e\u3059\u308b\u3053\u3068\u3067\u3001\u5404\u30b9\u30c6\u30c3\u30d7\u3092\u8996\u8074\u8005\u306b\u8aac\u660e\u3067\u304d\u307e\u3059\u3002 \u3053\u308c\u306b\u3088\u308a\u3001\u7406\u89e3\u304c\u6df1\u307e\u308b\u3060\u3051\u3067\u306a\u304f\u3001\u5b9f\u969b\u306b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u5c55\u958b\u3059\u308b\u3053\u3068\u3078\u306e\u81ea\u4fe1\u3082\u9ad8\u307e\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/chat.openai.com\/_next\/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAAcHTtdQvKTfcfwR0bXrfLjIN0Vmoln5pVObYXE2hRFieJsISok%3Ds96-c&amp;w=96&amp;q=75\" alt=\"User\"\/><\/figure>\n\n\n\n<p>\u9ad8\u5ea6\u306a\u30c8\u30d4\u30c3\u30af\u306b\u95a2\u3059\u308bChatGPT\u306e\u56fd\u969b\u5316\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<p>\u56fd\u969b\u5316 (i18n) \u306f\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u958b\u767a\u306b\u304a\u3051\u308b\u91cd\u8981\u306a\u30c8\u30d4\u30c3\u30af\u3067\u3042\u308a\u3001\u8907\u6570\u306e\u8a00\u8a9e\u3068\u5730\u57df\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u3088\u3046\u306b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u307e\u305f\u306f Web \u30b5\u30a4\u30c8\u3092\u9069\u5fdc\u3055\u305b\u308b\u3053\u3068\u304c\u542b\u307e\u308c\u307e\u3059\u3002 \u591a\u304f\u306e\u4f01\u696d\u3084\u958b\u767a\u8005\u306b\u3068\u3063\u3066\u3001\u56fd\u969b\u5316\u306f\u3001\u30b0\u30ed\u30fc\u30d0\u30eb\u306a\u30aa\u30fc\u30c7\u30a3\u30a8\u30f3\u30b9\u3092\u62e1\u5927\u3057\u3001\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3055\u308c\u305f\u30a8\u30af\u30b9\u30da\u30ea\u30a8\u30f3\u30b9\u3092\u63d0\u4f9b\u3059\u308b\u305f\u3081\u306e\u9375\u3067\u3059\u3002 \u6b21\u306b.js \u306b\u306f\u56fd\u969b\u5316\u306e\u30b5\u30dd\u30fc\u30c8\u304c\u7d44\u307f\u8fbc\u307e\u308c\u3066\u304a\u308a\u3001\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306b\u542b\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u8a73\u7d30\u306a\u8aac\u660e\u3092\u6b21\u306b\u793a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u56fd\u969b\u5316 (i18n) \u306e\u30b5\u30dd\u30fc\u30c8\u306f Next \u3067\u884c\u3044\u307e\u3059.js<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">1.&nbsp;<strong>\u8a2d\u5b9a<\/strong><\/h4>\n\n\n\n<p>\u6b21\u306e.js\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u306f\u3001\u307e\u305a\u30d5\u30a1\u30a4\u30eb\u3067\u56fd\u969b\u5316\u8a2d\u5b9a\u3092\u69cb\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u8a2d\u5b9a\u4f8b:<code>next.config.js<\/code><\/p>\n\n\n\n<p>\u30b8\u30e3\u30d0\u30b9\u30af\u30ea\u30d7\u30c8\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30fc<\/p>\n\n\n\n<p><code>module.exports = { i18n: { locales: ['en-US', 'fr', 'de'], \/\/ \u652f\u6301\u7684\u8bed\u8a00\u5217\u8868 defaultLocale: 'en-US', \/\/ \u9ed8\u8ba4\u8bed\u8a00 }, };<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2.&nbsp;<strong>\u8a00\u8a9e\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0<\/strong><\/h4>\n\n\n\n<p>\u69cb\u6210\u304c\u5b8c\u4e86\u3059\u308b\u3068\u3001Next.js \u306b\u3088\u3063\u3066\u8a00\u8a9e\u30d9\u30fc\u30b9\u306e\u30eb\u30fc\u30c8\u304c\u81ea\u52d5\u7684\u306b\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002 \u305f\u3068\u3048\u3070\u3001\u30d5\u30e9\u30f3\u30b9\u8a9e\u3092\u8a71\u3059\u30e6\u30fc\u30b6\u30fc\u306b\u306f [\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831] \u30da\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<code>\/fr\/about<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3.\u6b21\u3078\/\u30ea\u30f3\u30af\u3068<strong><code>\u6b21\u3078\/\u30eb\u30fc\u30bf\u30fc<\/code>\u3092\u4f7f\u7528\u3057\u3066\u3001\u30ea\u30f3\u30af\u3068\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0<code><\/code>\u3092\u51e6\u7406\u3057\u307e\u3059<\/strong><\/h4>\n\n\n\n<p>Next.js \u304c\u63d0\u4f9b\u3059\u308b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3001\u591a\u8a00\u8a9e\u30ea\u30f3\u30af\u3068\u30eb\u30fc\u30c8\u30b8\u30e3\u30f3\u30d7\u3092\u51e6\u7406\u3067\u304d\u307e\u3059\u3002<code>link<\/code><code>router<\/code><\/p>\n\n\n\n<p>jsxCopy code<\/p>\n\n\n\n<p><code>import Link from 'next\/link'; export default function Menu() { return ( &lt;nav&gt; &lt;Link href=\"\/about\" locale=\"fr\"&gt; &lt;a&gt;About (French)&lt;\/a&gt; &lt;\/Link&gt; &lt;\/nav&gt; ); }<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">4<strong>.\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u7ffb\u8a33\u3059\u308b<\/strong><\/h4>\n\n\n\n<p>\u7ffb\u8a33\u306f\u901a\u5e38\u3001JSON \u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u7528\u3057\u3066\u5404\u8a00\u8a9e\u306e\u7ffb\u8a33\u3092\u4fdd\u5b58\u3059\u308b\u306a\u3069\u3001\u500b\u5225\u306e\u30d5\u30a1\u30a4\u30eb\u307e\u305f\u306f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u4fdd\u5b58\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>jsonCopy code<\/p>\n\n\n\n<p><code>\/\/ en-US.json { \"welcome\": \"Welcome!\" } \/\/ fr.json { \"welcome\": \"Bienvenue!\" }<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">5.<strong>\u7ffb\u8a33\u3092\u4f7f\u7528\u3059\u308b<\/strong><\/h4>\n\n\n\n<p>\u6b21\u306e\u3088\u3046\u306a\u3044\u304f\u3064\u304b\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3057\u3066\u3001\u7ffb\u8a33\u6a5f\u80fd\u3092\u5b9f\u88c5\u3067\u304d\u307e\u3059\u3002<code>react-i18next<\/code><\/p>\n\n\n\n<p>jsxCopy code<\/p>\n\n\n\n<p><code>import { useTranslation } from 'react-i18next'; function WelcomeMessage() { const { t } = useTranslation(); return &lt;h1&gt;{t('welcome')}&lt;\/h1&gt;; }<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5229\u70b9\u3068\u8ab2\u984c<\/h3>\n\n\n\n<p><strong>\u5229\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u30aa\u30fc\u30c7\u30a3\u30a8\u30f3\u30b9\u3092\u5897\u3084\u3059:<\/strong>&nbsp;\u8907\u6570\u306e\u8a00\u8a9e\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u3053\u3068\u3067\u3001\u4e16\u754c\u4e2d\u306e\u30e6\u30fc\u30b6\u30fc\u3092\u5f15\u304d\u4ed8\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3055\u308c\u305f\u30a8\u30af\u30b9\u30da\u30ea\u30a8\u30f3\u30b9\u3092\u63d0\u4f9b\u3059\u308b:<\/strong>&nbsp;\u5730\u57df\u3084\u6587\u5316\u3092\u8d85\u3048\u3066\u3001\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3055\u308c\u305f\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u30e6\u30fc\u30b6\u30fc\u306b\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u6311\u6226\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u30b3\u30b9\u30c8:<\/strong>\u3055\u307e\u3056\u307e\u306a\u8a00\u8a9e\u306e\u7ffb\u8a33\u306f\u3001\u6b63\u78ba\u304b\u3064\u6700\u65b0\u306e\u72b6\u614b\u306b\u4fdd\u3064\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u8907\u96d1\u3055:<\/strong>&nbsp;\u3055\u307e\u3056\u307e\u306a\u8a00\u8a9e\u306e\u5f62\u5f0f\u3001\u30eb\u30fc\u30c8\u6848\u5185\u3001\u65e5\u4ed8\u3001\u6570\u5024\u306a\u3069\u306e\u5f62\u5f0f\u3092\u8003\u616e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8981<\/h3>\n\n\n\n<p>\u56fd\u969b\u5316\u306f\u8907\u96d1\u3067\u3059\u304c\u3084\u308a\u304c\u3044\u306e\u3042\u308b\u30d7\u30ed\u30bb\u30b9\u3067\u3042\u308a\u3001Next.js\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4e16\u754c\u4e2d\u306e\u30aa\u30fc\u30c7\u30a3\u30a8\u30f3\u30b9\u306b\u9069\u3057\u305f\u3082\u306e\u306b\u3057\u307e\u3059\u3002 \u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u30d3\u30c7\u30aa\u3067\u4f8b\u3068\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u3092\u63d0\u4f9b\u3059\u308b\u3053\u3068\u3067\u3001Next.js\u306e\u5f37\u529b\u306a\u56fd\u969b\u5316\u30b5\u30dd\u30fc\u30c8\u3092\u5b9f\u88c5\u3057\u3066\u6d3b\u7528\u3059\u308b\u65b9\u6cd5\u3092\u8996\u8074\u8005\u304c\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u652f\u63f4\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u308c\u3089\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3068\u5b9f\u7528\u7684\u306a\u4f8b\u306f\u3001\u8aad\u8005\u3001\u7279\u306b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u56fd\u969b\u5e02\u5834\u306b\u6301\u3061\u8fbc\u3082\u3046\u3068\u3057\u3066\u3044\u308b\u958b\u767a\u8005\u3092\u52b9\u679c\u7684\u306b\u5c0e\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/chat.openai.com\/_next\/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAAcHTtdQvKTfcfwR0bXrfLjIN0Vmoln5pVObYXE2hRFieJsISok%3Ds96-c&amp;w=96&amp;q=75\" alt=\"User\"\/><\/figure>\n\n\n\n<p>\u9ad8\u5ea6\u306a\u30c8\u30d4\u30c3\u30af\u306e\u74b0\u5883\u5909\u6570ChatGPT\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<p>\u74b0\u5883\u5909\u6570\u306f\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u958b\u767a\u306b\u304a\u3044\u3066\u91cd\u8981\u306a\u5f79\u5272\u3092\u679c\u305f\u3057\u3001\u7570\u306a\u308b\u958b\u767a\u74b0\u5883\u3001\u30c6\u30b9\u30c8\u74b0\u5883\u3001\u304a\u3088\u3073\u904b\u7528\u74b0\u5883\u9593\u3067\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u67d4\u8edf\u306b\u69cb\u6210\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002 Next .js\u3067\u306f\u3001\u74b0\u5883\u5909\u6570\u3092\u7279\u5b9a\u306e\u30d5\u30a1\u30a4\u30eb\u3068\u5909\u6570\u3067\u7ba1\u7406\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306f\u3001\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u4f7f\u7528\u3067\u304d\u308b\u6b21\u306e.js\u306e\u74b0\u5883\u5909\u6570\u306e\u8a73\u7d30\u306a\u8aac\u660e\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u74b0\u5883\u5909\u6570\u306e\u5b9a\u7fa9\u3068\u4f7f\u7528<\/h3>\n\n\n\n<p>\u74b0\u5883\u5909\u6570\u306f\u901a\u5e38\u3001\u69cb\u6210\u8a2d\u5b9a\u3001\u30ad\u30fc\u3001URL \u306a\u3069\u3092\u683c\u7d0d\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u3001\u74b0\u5883 (\u958b\u767a\u3001\u904b\u7528\u3001\u30c6\u30b9\u30c8\u306a\u3069) \u306b\u3088\u3063\u3066\u7570\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6b21\u306e.js\u3067\u74b0\u5883\u5909\u6570\u3092\u4f7f\u7528\u3059\u308b<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">1.&nbsp;<strong>\u74b0\u5883\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b<\/strong><\/h4>\n\n\n\n<p>Next.js \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30eb\u30fc\u30c8 \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u3001\u74b0\u5883\u5909\u6570\u3092\u683c\u7d0d\u3059\u308b\u6b21\u306e\u74b0\u5883\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>.env<\/code>: \u65e2\u5b9a\u306e\u74b0\u5883\u30d5\u30a1\u30a4\u30eb\u3002<\/li>\n\n\n\n<li><code>.env.local<\/code>: \u30ed\u30fc\u30ab\u30eb\u958b\u767a\u74b0\u5883\u3092\u683c\u7d0d\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u308b\u74b0\u5883\u5909\u6570\u3002<\/li>\n\n\n\n<li><code>.env.development<\/code>\u306a\u3069: \u74b0\u5883\u56fa\u6709\u306e\u30d5\u30a1\u30a4\u30eb\u3002<code>.env.production<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">2.&nbsp;<strong>\u74b0\u5883\u5909\u6570\u3092\u8ffd\u52a0\u3059\u308b<\/strong><\/h4>\n\n\n\n<p>\u3053\u308c\u3089\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u306f\u3001\u6b21\u306e\u3088\u3046\u306a\u74b0\u5883\u5909\u6570\u3092\u8ffd\u52a0\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>env\u30b3\u30d4\u30fc\u30b3\u30fc\u30c9<\/p>\n\n\n\n<p><code>NEXT_PUBLIC_API_URL=https:\/\/api.example.com SECRET_API_KEY=mysecretkey<\/code><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u5909\u6570\u306f\u3001\u30d6\u30e9\u30a6\u30b6\u30fc\u306b\u516c\u958b\u3055\u308c\u307e\u3059\u3002<code>NEXT_PUBLIC_<\/code><\/li>\n\n\n\n<li>\u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u306a\u3044\u5909\u6570\u306f\u3001\u30b5\u30fc\u30d0\u30fc\u5074\u3067\u306e\u307f\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">3.&nbsp;<strong>\u74b0\u5883\u5909\u6570\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b<\/strong><\/h4>\n\n\n\n<p>Next .js \u30b3\u30fc\u30c9\u3067\u306f\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4ecb\u3057\u3066\u74b0\u5883\u5909\u6570\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002<code>process.env<\/code><\/p>\n\n\n\n<p>jsxCopy code<\/p>\n\n\n\n<p><code>const apiUrl = process.env.NEXT_PUBLIC_API_URL;<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">4.<strong>\u518d\u69cb\u7bc9<\/strong><\/h4>\n\n\n\n<p>\u74b0\u5883\u5909\u6570\u3092\u8ffd\u52a0\u307e\u305f\u306f\u5909\u66f4\u3057\u305f\u5f8c\u3001\u5909\u66f4\u3092\u6709\u52b9\u306b\u3059\u308b\u305f\u3081\u306b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u30ea\u30d3\u30eb\u30c9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">5<strong>. \u8003\u616e\u4e8b\u9805\u3068\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8 \u30b3\u30fc\u30c9\u3067\u6a5f\u5bc6\u60c5\u5831\u3092\u516c\u958b\u3057\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002&nbsp;<\/strong>\u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u5909\u6570\u306f\u3059\u3079\u3066\u30d6\u30e9\u30a6\u30b6\u30fc\u306b\u516c\u958b\u3055\u308c\u307e\u3059\u3002<code>NEXT_PUBLIC_<\/code><\/li>\n\n\n\n<li><strong><code>.env.local<\/code>&nbsp;\u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u7528\u3057\u3066\u3001\u30ed\u30fc\u30ab\u30eb\u958b\u767a\u8a2d\u5b9a\u3092\u4fdd\u5b58\u3057\u307e\u3059\u3002&nbsp;<\/strong>\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u30bd\u30fc\u30b9 \u30b3\u30fc\u30c9 \u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u30b3\u30df\u30c3\u30c8\u3057\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8981<\/h3>\n\n\n\n<p>Next.js \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u74b0\u5883\u5909\u6570\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u958b\u767a\u8005\u306f\u3055\u307e\u3056\u307e\u306a\u74b0\u5883\u9593\u3067\u69cb\u6210\u3092\u67d4\u8edf\u304b\u3064\u5b89\u5168\u306b\u7ba1\u7406\u3067\u304d\u307e\u3059\u3002 \u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb \u30d3\u30c7\u30aa\u3067\u306f\u3001\u30b5\u30f3\u30d7\u30eb \u30b3\u30fc\u30c9\u3068\u8aac\u660e\u3092\u4f7f\u7528\u3057\u3066\u3001\u3053\u308c\u3089\u306e\u74b0\u5883\u5909\u6570\u3092\u52b9\u679c\u7684\u306b\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\u3092\u793a\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u95a2\u9023\u3059\u308b\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3068\u30d9\u30b9\u30c8 \u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u306b\u91cd\u70b9\u3092\u7f6e\u304d\u306a\u304c\u3089\u3001\u74b0\u5883\u5909\u6570\u306e\u4f5c\u6210\u3001\u69cb\u6210\u3001\u304a\u3088\u3073\u4f7f\u7528\u3092\u6bb5\u968e\u7684\u306b\u8aac\u660e\u3059\u308b\u3053\u3068\u3067\u3001\u3053\u306e\u9ad8\u5ea6\u306a\u30c8\u30d4\u30c3\u30af\u3092\u3088\u308a\u3088\u304f\u7406\u89e3\u3057\u3001\u81ea\u5206\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u5b9f\u88c5\u3059\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/chat.openai.com\/_next\/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAAcHTtdQvKTfcfwR0bXrfLjIN0Vmoln5pVObYXE2hRFieJsISok%3Ds96-c&amp;w=96&amp;q=75\" alt=\"User\"\/><\/figure>\n\n\n\n<p>\u30ab\u30b9\u30bf\u30e0\u30b5\u30fc\u30d0\u30fc\u3068\u30df\u30c9\u30eb\u30a6\u30a7\u30a2ChatGPT\u306e\u9ad8\u5ea6\u306a\u30c8\u30d4\u30c3\u30af\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<p>Next.js \u3067\u306f\u3001\u30ab\u30b9\u30bf\u30e0 \u30b5\u30fc\u30d0\u30fc\u3068\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306f\u3001\u958b\u767a\u8005\u304c\u30b5\u30fc\u30d0\u30fc\u306e\u52d5\u4f5c\u3068\u8981\u6c42\u51e6\u7406\u3092\u5236\u5fa1\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u9ad8\u5ea6\u306a\u30c8\u30d4\u30c3\u30af\u3067\u3059\u3002 \u4ee5\u4e0b\u306f\u3001\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306b\u9069\u3057\u305f\u30ab\u30b9\u30bf\u30e0\u30b5\u30fc\u30d0\u30fc\u3068\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306e\u8a73\u7d30\u306a\u8aac\u660e\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30ab\u30b9\u30bf\u30e0\u30b5\u30fc\u30d0\u30fc<\/h3>\n\n\n\n<p>\u30ab\u30b9\u30bf\u30e0\u30b5\u30fc\u30d0\u30fc\u3092\u4f7f\u7528\u3059\u308b\u3068.js Next\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u30b5\u30fc\u30d0\u30fc\u3092\u4efb\u610f\u306e\u30b5\u30fc\u30d0\u30fc\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af(Express\u3001Koa\u306a\u3069)\u306b\u7f6e\u304d\u63db\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">1.&nbsp;<strong>\u30ab\u30b9\u30bf\u30e0 \u30b5\u30fc\u30d0\u30fc\u3092\u4f5c\u6210\u3059\u308b<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Express:bashCopy \u30b3\u30fc\u30c9\u306a\u3069\u306e<strong>\u5fc5\u8981\u306a\u30b5\u30fc\u30d0\u30fc \u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059<\/strong><code>npm install express<\/code><\/li>\n\n\n\n<li>JavaScript \u306a\u3069\u306e<strong>\u30ab\u30b9\u30bf\u30e0 \u30b5\u30fc\u30d0\u30fc \u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b<\/strong>&nbsp;\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30fc\u3059\u308b<code>server.js<\/code><code>const express = require('express'); const next = require('next'); const dev = process.env.NODE_ENV !== 'production'; const app = next({ dev }); const handle = app.getRequestHandler(); app.prepare().then(() =&gt; { const server = express(); server.get('\/p\/:id', (req, res) =&gt; { const actualPage = '\/post'; const queryParams = { id: req.params.id }; app.render(req, res, actualPage, queryParams); }); server.get('*', (req, res) =&gt; { return handle(req, res); }); server.listen(3000, (err) =&gt; { if (err) throw err; console.log('&gt; Ready on http:\/\/localhost:3000'); }); });<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">2.&nbsp;<strong>\u6ce8\u610f\u4e8b\u9805<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30b5\u30fc\u30d0\u30fc\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u3068\u3001\u4e00\u90e8\u306e Next.js \u81ea\u52d5\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u6a5f\u80fd\u304c\u5931\u6557\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u7279\u5225\u306a\u30cb\u30fc\u30ba\u304c\u306a\u3044\u5834\u5408\u306f\u3001Next.js \u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30b5\u30fc\u30d0\u30fc\u304a\u3088\u3073 API \u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u30df\u30c9\u30eb\u30a6\u30a7\u30a2<\/h3>\n\n\n\n<p>\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u6b21\u306e.js\u304c\u8981\u6c42\u3092\u51e6\u7406\u3059\u308b\u524d\u306b\u8981\u6c42\u3092\u64cd\u4f5c\u3067\u304d\u307e\u3059\u3002 \u6b21\u306b.js 12\u3067\u306f\u3001\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3092\u30da\u30fc\u30b8\u30ec\u30d9\u30eb\u3067\u4f7f\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u65b0\u6a5f\u80fd\u304c\u5c0e\u5165\u3055\u308c\u3066\u3044\u307e\u3059\u3002<code>_middleware.js<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">1.&nbsp;<strong>\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b javascriptCopy \u30b3\u30fc\u30c9\u3068\u3044\u3046\u540d\u524d\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059<code>_middleware.js<\/code><code>\/\/ _middleware.js function middleware(req, res, next) { \/\/ \u81ea\u5b9a\u4e49\u903b\u8f91\uff0c\u4f8b\u5982\u68c0\u67e5\u8eab\u4efd\u9a8c\u8bc1 if (!req.headers.authorization) { res.status(401).end('Unauthorized'); return; } next(); } export default middleware;<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">2.<strong>\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3092\u4f7f\u7528\u3059\u308b<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u3053\u306e\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306f\u3001\u3059\u3079\u3066\u306e\u30da\u30fc\u30b8\u3068 API \u30eb\u30fc\u30c8\u306b\u9069\u7528\u3055\u308c\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3067\u306f\u3001\u8a8d\u8a3c\u3001\u30ed\u30ae\u30f3\u30b0\u3001\u8981\u6c42\u5909\u63db\u306a\u3069\u3001\u3055\u307e\u3056\u307e\u306a\u30bf\u30b9\u30af\u3092\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8981<\/h3>\n\n\n\n<p>\u30ab\u30b9\u30bf\u30e0 \u30b5\u30fc\u30d0\u30fc\u3068\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306b\u3088\u308a\u3001\u958b\u767a\u8005\u306f\u3088\u308a\u512a\u308c\u305f\u5236\u5fa1\u3068\u67d4\u8edf\u6027\u3092\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002 \u30ab\u30b9\u30bf\u30e0\u30b5\u30fc\u30d0\u30fc\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u30b5\u30fc\u30d0\u30fc\u306e\u52d5\u4f5c\u3092\u3088\u308a\u8a73\u7d30\u306b\u5236\u5fa1\u3067\u304d\u307e\u3059\u304c\u3001\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u8981\u6c42\u304c\u51e6\u7406\u3055\u308c\u308b\u524d\u306b\u30ab\u30b9\u30bf\u30e0\u30ed\u30b8\u30c3\u30af\u3092\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u30b3\u30fc\u30c9 \u30b5\u30f3\u30d7\u30eb\u3068\u8a73\u7d30\u306a\u624b\u9806\u3092\u63d0\u4f9b\u3059\u308b\u3053\u3068\u3067\u30ab\u30b9\u30bf\u30e0 \u30b5\u30fc\u30d0\u30fc\u3068\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3092\u5b9f\u88c5\u3059\u308b\u65b9\u6cd5\u3092\u793a\u3057\u3001\u3053\u308c\u3089\u306e\u9ad8\u5ea6\u306a\u6a5f\u80fd\u3092\u4f7f\u7528\u3059\u308b\u30bf\u30a4\u30df\u30f3\u30b0\u3068\u7406\u7531\u3092\u5f37\u8abf\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u308c\u3089\u306e\u6a5f\u80fd\u306f\u7279\u5225\u306a\u30cb\u30fc\u30ba\u3092\u6301\u3064\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u9069\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u591a\u304f\u3001\u5f37\u3044\u30cb\u30fc\u30ba\u304c\u306a\u3044\u5834\u5408\u306f\u3001\u81ea\u52d5\u6700\u9069\u5316\u306e\u6069\u6075\u3092\u53d7\u3051\u308b\u305f\u3081\u306b.js Next\u306e\u7d44\u307f\u8fbc\u307f\u6a5f\u80fd\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/chat.openai.com\/_next\/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAAcHTtdQvKTfcfwR0bXrfLjIN0Vmoln5pVObYXE2hRFieJsISok%3Ds96-c&amp;w=96&amp;q=75\" alt=\"User\"\/><\/figure>\n\n\n\n<p>ChatGPT\u3092\u4f7f\u7528\u3057\u305fTypeScript\u306e\u9ad8\u5ea6\u306a\u30c8\u30d4\u30c3\u30af\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<p>TypeScript \u306f\u3001\u578b\u30c1\u30a7\u30c3\u30af\u3084\u305d\u306e\u4ed6\u306e\u9ad8\u5ea6\u306a\u6a5f\u80fd\u3092\u958b\u767a\u8005\u306b\u63d0\u4f9b\u3059\u308b\u3001\u53b3\u5bc6\u306b\u578b\u6307\u5b9a\u3055\u308c\u305f JavaScript \u30b9\u30fc\u30d1\u30fc\u30bb\u30c3\u30c8\u3067\u3059\u3002 [\u6b21\u3078] \u3067 TypeScript \u3092\u4f7f\u7528\u3059\u308b\u3068.js\u30b3\u30fc\u30c9\u306e\u54c1\u8cea\u3068\u4fdd\u5b88\u6027\u304c\u5411\u4e0a\u3057\u307e\u3059\u3002 \u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u300c\u6b21\u3078.js \u3067 TypeScript \u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306e\u8a73\u7d30\u306a\u8aac\u660e\u3092\u6b21\u306b\u793a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30bf\u30a4\u30d7\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5229\u70b9<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u30bf\u30a4\u30d7 \u30bb\u30fc\u30d5<\/strong>: \u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306e\u578b\u30c1\u30a7\u30c3\u30af\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u591a\u304f\u306e\u4e00\u822c\u7684\u306a\u30a8\u30e9\u30fc\u3092\u30ad\u30e3\u30c3\u30c1\u3067\u304d\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u30aa\u30fc\u30c8\u30b3\u30f3\u30d7\u30ea\u30fc\u30c8\u3068\u30a4\u30f3\u30c6\u30ea\u30d2\u30f3\u30c8<\/strong>: \u3088\u308a\u512a\u308c\u305f\u30a8\u30c7\u30a3\u30bf\u30fc \u30b5\u30dd\u30fc\u30c8\u3068\u30b3\u30fc\u30c9 \u30d2\u30f3\u30c8\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u8aad\u307f\u3084\u3059\u3055\u3068\u4fdd\u5b88\u6027<\/strong>: \u578b\u306e\u6ce8\u91c8\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u30b3\u30fc\u30c9\u306e\u7406\u89e3\u3068\u4fdd\u5b88\u304c\u5bb9\u6613\u306b\u306a\u308a\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u6b21\u306e.js\u3067\u30bf\u30a4\u30d7\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u8a2d\u5b9a\u3059\u308b<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">1.<strong>\u30bf\u30a4\u30d7\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059<\/strong><\/h4>\n\n\n\n<p>\u30d0\u30c3\u30b7\u30e5\u30b3\u30d4\u30fc\u30b3\u30fc\u30c9<\/p>\n\n\n\n<p><code>npm install --save-dev typescript @types\/react @types\/node<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2.&nbsp;<strong><code>tsconfig.json<\/code>&nbsp;\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b<\/strong><\/h4>\n\n\n\n<p>[\u5b9f\u884c] \u3092\u9078\u629e\u3059\u308b\u3068\u3001[\u6b21\u3078.js \u30d5\u30a1\u30a4\u30eb\u304c\u81ea\u52d5\u7684\u306b\u4f5c\u6210\u3055\u308c\u308b\u3088\u3046\u306b\u6c42\u3081\u3089\u308c\u307e\u3059\u3002<code>next dev<\/code><code>tsconfig.json<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>3.JS\u30d5\u30a1\u30a4\u30eb\u3092TS\u30d5\u30a1\u30a4\u30eb\u306b\u5909\u63db\u3057\u307e\u3059<\/strong><\/h4>\n\n\n\n<p>\u30d5\u30a1\u30a4\u30eb\u306e\u540d\u524d\u3092\u5909\u66f4\u3067\u304d\u307e\u3059 (\u307e\u305f\u306f JSX \u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u5834\u5408)\u3002<code>.js<\/code><code>.ts<\/code><code>.tsx<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30bf\u30a4\u30d7\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f7f\u7528\u3059\u308b<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">1.&nbsp;<strong>\u578b\u6ce8\u91c8<\/strong><\/h4>\n\n\n\n<p>\u95a2\u6570\u3068\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306b\u578b\u6ce8\u91c8\u3092\u8ffd\u52a0\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30bf\u30a4\u30d7\u30b9\u30af\u30ea\u30d7\u30c8\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30fc<\/p>\n\n\n\n<p><code>type Props = { name: string; }; function Welcome(props: Props) { \/\/ ... }<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2.&nbsp;<strong>\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u5b9a\u7fa9<\/strong><\/h4>\n\n\n\n<p>\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u4f7f\u7528\u3057\u3066\u8907\u5408\u578b\u69cb\u9020\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30bf\u30a4\u30d7\u30b9\u30af\u30ea\u30d7\u30c8\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30fc<\/p>\n\n\n\n<p><code>interface User { name: string; age: number; }<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3.<strong>\u30b8\u30a7\u30cd\u30ea\u30c3\u30af\u533b\u85ac\u54c1<\/strong><\/h4>\n\n\n\n<p>TypeScript \u306e\u30b8\u30a7\u30cd\u30ea\u30c3\u30af\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u518d\u5229\u7528\u53ef\u80fd\u306a\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3068\u95a2\u6570\u3092\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30bf\u30a4\u30d7\u30b9\u30af\u30ea\u30d7\u30c8\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30fc<\/p>\n\n\n\n<p><code>function getData&lt;T&gt;(url: string): Promise&lt;T&gt; { \/\/ ... }<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">4.&nbsp;<strong>\u30e2\u30b8\u30e5\u30fc\u30eb\u62e1\u5f35<\/strong><\/h4>\n\n\n\n<p>Next.js \u306e Request \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068 Response \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u62e1\u5f35\u306a\u3069\u3001\u65e2\u5b58\u306e\u578b\u5b9a\u7fa9\u3092\u62e1\u5f35\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">5.<strong>\u30c4\u30fc\u30eb\u3068\u30ea\u30f3\u30c6\u30a3\u30f3\u30b0<\/strong><\/h4>\n\n\n\n<p>TSLint \u3084 ESLint \u306a\u3069\u306e\u30c4\u30fc\u30eb\u3092 TypeScript \u3068\u5171\u306b\u4f7f\u7528\u3057\u3066\u3001\u30b3\u30fc\u30c9 \u30b9\u30bf\u30a4\u30eb\u3068\u6f5c\u5728\u7684\u306a\u554f\u984c\u3092\u81ea\u52d5\u7684\u306b\u30c1\u30a7\u30c3\u30af\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8981<\/h3>\n\n\n\n<p>Next.js\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306bTypeScript\u3092\u5c0e\u5165\u3059\u308b\u3068\u3001\u30b3\u30fc\u30c9\u306e\u5805\u7262\u6027\u3001\u53ef\u8aad\u6027\u3001\u304a\u3088\u3073\u4fdd\u5b88\u6027\u304c\u5411\u4e0a\u3057\u307e\u3059\u3002 \u4e00\u5b9a\u306e\u5b66\u7fd2\u66f2\u7dda\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u591a\u304f\u306e\u958b\u767a\u8005\u306f\u305d\u308c\u304c\u4fa1\u5024\u306e\u3042\u308b\u6295\u8cc7\u3067\u3042\u308b\u3068\u611f\u3058\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u6b21\u306e.js\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067 TypeScript \u3092\u8a2d\u5b9a\u3057\u3066\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\u3092\u9806\u3092\u8ffd\u3063\u3066\u8aac\u660e\u3057\u3001\u578b\u3001\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u5b9a\u7fa9\u3057\u3001\u30b8\u30a7\u30cd\u30ea\u30c3\u30af\u306a\u3069\u306e\u9ad8\u5ea6\u306a\u6a5f\u80fd\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4f8b\u3068\u8aac\u660e\u3092\u901a\u3058\u3066\u3001TypeScript\u306e\u529b\u3092\u6d3b\u7528\u3057\u3066\u3001\u3088\u308a\u5805\u7262\u3067\u4fdd\u5b88\u3057\u3084\u3059\u3044Next.js\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u69cb\u7bc9\u3059\u308b\u65b9\u6cd5\u3092\u5b66\u3076\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/chat.openai.com\/_next\/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAAcHTtdQvKTfcfwR0bXrfLjIN0Vmoln5pVObYXE2hRFieJsISok%3Ds96-c&amp;w=96&amp;q=75\" alt=\"User\"\/><\/figure>\n\n\n\n<p>Next.js Community and Resources ChatGPT\u306e\u9589\u4f1a\u306e\u6328\u62f6\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<p>\u6b21\u306b.js\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u3068\u30ea\u30bd\u30fc\u30b9\u306f\u3001Next.js \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u69cb\u7bc9\u3068\u7dad\u6301\u306e\u91cd\u8981\u306a\u90e8\u5206\u3067\u3059\u3002 \u3053\u308c\u3089\u306e\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u3068\u30ea\u30bd\u30fc\u30b9\u306f\u3001\u958b\u767a\u8005\u304c\u554f\u984c\u3092\u89e3\u6c7a\u3057\u3001\u65b0\u3057\u3044\u30b9\u30ad\u30eb\u3092\u5b66\u3073\u3001\u4ef2\u9593\u3068\u3064\u306a\u304c\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002 \u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u7de0\u3081\u304f\u304f\u308a\u306e Next.js \u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u3068\u30ea\u30bd\u30fc\u30b9\u306e\u8a73\u7d30\u306a\u8aac\u660e\u3092\u6b21\u306b\u793a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1.&nbsp;<strong>\u6b21\u3078.js\u516c\u5f0f\u30b5\u30a4\u30c8<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8<\/strong>:&nbsp;<a href=\"https:\/\/nextjs.org\/\">\u6b21\u3078.js\u516c\u5f0f\u30b5\u30a4\u30c8<\/a><\/li>\n\n\n\n<li><strong>\u30ea\u30bd\u30fc\u30b9<\/strong>: \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3001\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3001\u4f8b\u306a\u3069\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c6\u30fc\u30b7\u30e7\u30f3<\/strong>: \u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f\u3001\u57fa\u672c\u7684\u306a\u3082\u306e\u304b\u3089\u9ad8\u5ea6\u306a\u3082\u306e\u307e\u3067\u3001\u3059\u3079\u3066\u306e\u30c8\u30d4\u30c3\u30af\u3092\u30ab\u30d0\u30fc\u3057\u3066\u3044\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2.&nbsp;<strong>GitHub \u30ea\u30dd\u30b8\u30c8\u30ea<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>URL<\/strong>:&nbsp;<a href=\"https:\/\/github.com\/vercel\/next.js\">\u6b21\u3078.js GitHub<\/a><\/li>\n\n\n\n<li><strong>\u30ea\u30bd\u30fc\u30b9<\/strong>: \u30b3\u30fc\u30c9\u3001\u554f\u984c\u8ffd\u8de1\u3001\u6295\u7a3f\u30ac\u30a4\u30c0\u30f3\u30b9\u3002<\/li>\n\n\n\n<li><strong>\u8ca2\u732e:<\/strong>&nbsp;\u958b\u767a\u8005\u306f\u3001\u554f\u984c\u3092\u5831\u544a\u3057\u3001\u30d7\u30eb\u8981\u6c42\u3092\u9001\u4fe1\u3057\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u958b\u767a\u306b\u8ca2\u732e\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">3<strong>.\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u30d5\u30a9\u30fc\u30e9\u30e0\u3068\u30c1\u30e3\u30c3\u30c8\u30eb\u30fc\u30e0<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u6b21\u3078.js\u30b9\u30da\u30af\u30c8\u30e9\u30e0\u30b3\u30df\u30e5\u30cb\u30c6\u30a3<\/strong>:\u8cea\u554f\u3084\u30c7\u30a3\u30b9\u30ab\u30c3\u30b7\u30e7\u30f3\u306e\u305f\u3081\u306e\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u30d5\u30a9\u30fc\u30e9\u30e0\u3002<\/li>\n\n\n\n<li><strong>Discord \u30c1\u30e3\u30f3\u30cd\u30eb\u3068 Slack \u30c1\u30e3\u30f3\u30cd\u30eb<\/strong>: \u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u304c\u7ba1\u7406\u3059\u308b\u30e9\u30a4\u30d6\u30c1\u30e3\u30c3\u30c8\u30eb\u30fc\u30e0\u3082\u3042\u308a\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u30b9\u30bf\u30c3\u30af\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc<\/strong>:\u30bf\u30b0\u3092\u4f7f\u7528\u3057\u3066\u3001\u95a2\u9023\u3059\u308b\u8cea\u554f\u3068\u56de\u7b54\u3092\u898b\u3064\u3051\u307e\u3059\u3002<code>next.js<\/code><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">4<strong>.\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3068\u30d6\u30ed\u30b0<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u516c\u5f0f\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb<\/strong>:\u6b21\u306b.js\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306a\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3002<\/li>\n\n\n\n<li>\u30b3\u30df\u30e5\u30cb\u30c6\u30a3 \u30d6\u30ed\u30b0: \u591a\u304f\u306e\u30b3\u30df\u30e5\u30cb\u30c6\u30a3 \u30e1\u30f3\u30d0\u30fc\u3084\u4f01\u696d\u304c\u3001\u30d6\u30ed\u30b0\u3092\u901a\u3058\u3066\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3001\u30a8\u30af\u30b9\u30da\u30ea\u30a8\u30f3\u30b9\u3001\u30d9\u30b9\u30c8 \u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u3092\u5171\u6709\u3057<strong>\u3066\u3044\u307e\u3059<\/strong>\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">5.<strong>\u30d7\u30e9\u30b0\u30a4\u30f3\u3068\u30c4\u30fc\u30eb<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u6b21\u3078.js \u4f8b<\/strong>: \u4ed6\u306e\u30c4\u30fc\u30eb\u3084\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u7d71\u5408\u3059\u308b\u65b9\u6cd5\u3092\u793a\u3059\u4e00\u9023\u306e\u516c\u5f0f\u4f8b\u3002<\/li>\n\n\n\n<li>\u7d20\u6674\u3089\u3057\u3044Next.js:\u30d7\u30e9\u30b0\u30a4\u30f3\u3001\u30c4\u30fc\u30eb\u3001\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306a\u3069\u3001\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u304c\u7ba1\u7406\u3059\u308b<strong>Next.js<\/strong>\u30ea\u30bd\u30fc\u30b9\u306e\u30ea\u30b9\u30c8\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">6.&nbsp;<strong>\u4f1a\u8b70\u3068\u30a4\u30d9\u30f3\u30c8<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u6b21\u3078.js Conf<\/strong>: \u6700\u65b0\u306e\u6a5f\u80fd\u3001\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u3001\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u30d7\u30ec\u30bc\u30f3\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u30ab\u30d0\u30fc\u3059\u308b\u516c\u5f0f\u306b\u958b\u50ac\u3055\u308c\u305f\u4f1a\u8b70\u3002<\/li>\n\n\n\n<li><strong>\u30ed\u30fc\u30ab\u30eb\u30df\u30fc\u30c8\u30a2\u30c3\u30d7<\/strong>:\u4e16\u754c\u4e2d\u3067\u958b\u50ac\u3055\u308c\u308b\u30cd\u30af\u30b9\u30c8.js\u95a2\u9023\u306e\u30df\u30fc\u30c8\u30a2\u30c3\u30d7\u3084\u30a4\u30d9\u30f3\u30c8\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8981<\/h3>\n\n\n\n<p>\u6b21\u306b.js\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u306f\u3001\u958b\u767a\u8005\u306b\u8c4a\u5bcc\u306a\u30ea\u30bd\u30fc\u30b9\u3068\u30b5\u30dd\u30fc\u30c8\u3092\u63d0\u4f9b\u3059\u308b\u30a2\u30af\u30c6\u30a3\u30d6\u3067\u591a\u69d8\u306a\u30a8\u30b3\u30b7\u30b9\u30c6\u30e0\u3067\u3059\u3002 \u521d\u5fc3\u8005\u3068\u7d4c\u9a13\u8c4a\u5bcc\u306a\u958b\u767a\u8005\u306e\u4e21\u65b9\u304c\u3001\u5fc5\u8981\u306a\u30d8\u30eb\u30d7\u3068\u30a4\u30f3\u30b9\u30d4\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u898b\u3064\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u7d50\u8ad6\u3067\u306f\u3001\u3053\u308c\u3089\u306e\u30ea\u30bd\u30fc\u30b9\u306e\u4fa1\u5024\u3092\u5f37\u8abf\u3057\u3001\u8996\u8074\u8005\u306b\u6df1\u304f\u63a2\u6c42\u3059\u308b\u3088\u3046\u306b\u4fc3\u3057\u3001\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u306b\u53c2\u52a0\u3057\u3066\u4ed6\u306eNext.js\u958b\u767a\u8005\u3068\u4ea4\u6d41\u3057\u3001\u5b66\u3076\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u3068\u4ea4\u6d41\u3059\u308b\u3053\u3068\u3067\u3001\u958b\u767a\u8005\u306f\u30b9\u30ad\u30eb\u3084\u77e5\u8b58\u3092\u5411\u4e0a\u3055\u305b\u308b\u3060\u3051\u3067\u306a\u304f\u3001Next.js\u306e\u958b\u767a\u3068\u6210\u9577\u306b\u3082\u8ca2\u732e\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/chat.openai.com\/_next\/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAAcHTtdQvKTfcfwR0bXrfLjIN0Vmoln5pVObYXE2hRFieJsISok%3Ds96-c&amp;w=96&amp;q=75\" alt=\"User\"\/><\/figure>\n\n\n\n<p>ChatGPT\u306e\u7d99\u7d9a\u7684\u306a\u5b66\u7fd2\u3068\u958b\u767a\u3078\u306e\u9053\u306e\u308a\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n\n\n\n<p>\u7d99\u7d9a\u7684\u306a\u5b66\u7fd2\u3068\u958b\u767a\u306e\u9053\u306f\u3001\u7279\u306b\u7d76\u3048\u305a\u5909\u5316\u3059\u308b\u30c6\u30af\u30ce\u30ed\u30b8\u30fc\u306e\u4e16\u754c\u306b\u304a\u3044\u3066\u3001\u958b\u767a\u8005\u306e\u30ad\u30e3\u30ea\u30a2\u306e\u91cd\u8981\u306a\u8981\u7d20\u3067\u3059\u3002 \u6b21\u306e.js\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u7d50\u8ad6\u3067\u306f\u3001\u7d99\u7d9a\u7684\u306a\u5b66\u7fd2\u306e\u91cd\u8981\u6027\u3092\u5f37\u8abf\u3057\u3001\u30b9\u30ad\u30eb\u3068\u77e5\u8b58\u3092\u7d99\u7d9a\u7684\u306b\u958b\u767a\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8996\u8074\u8005\u3092\u5c0e\u304f\u305f\u3081\u306e\u3044\u304f\u3064\u304b\u306e\u63d0\u6848\u3092\u63d0\u4f9b\u3067\u304d\u307e\u3059\u3002 \u8003\u3048\u3089\u308c\u308b\u8aac\u660e\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1.<strong>\u6700\u65b0\u306e\u30c8\u30ec\u30f3\u30c9\u3068\u66f4\u65b0\u3092\u8ffd\u8de1\u3057\u307e\u3059<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30d6\u30ed\u30b0\u3084\u30cb\u30e5\u30fc\u30b9\u30d5\u30a3\u30fc\u30c9\u3092\u8cfc\u8aad\u3059\u308b: Next .js \u3084\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u304c\u958b\u767a\u3057\u305f<strong>\u30d6\u30ed\u30b0\u3001\u30cb\u30e5\u30fc\u30b9\u30d5\u30a3\u30fc\u30c9<\/strong>\u3001\u30b3\u30df\u30e5\u30cb\u30c6\u30a3 \u30b5\u30a4\u30c8\u3092\u5b9a\u671f\u7684\u306b\u30c1\u30a7\u30c3\u30af\u3057\u3066\u3001\u6700\u65b0\u306e\u30c8\u30ec\u30f3\u30c9\u3084\u30c6\u30af\u30ce\u30ed\u30b8\u306b\u95a2\u3059\u308b\u60c5\u5831\u3092\u5165\u624b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n\n\n\n<li><strong>\u30ab\u30f3\u30d5\u30a1\u30ec\u30f3\u30b9\u3084\u8b1b\u6f14\u3092\u8996\u8074<\/strong>\u3059\u308b: \u30aa\u30f3\u30e9\u30a4\u30f3 \u30d3\u30c7\u30aa\u3084\u30e9\u30a4\u30d6 \u30a4\u30d9\u30f3\u30c8\u3092\u901a\u3058\u3066\u3001\u696d\u754c\u306e\u5c02\u9580\u5bb6\u304b\u3089\u30a4\u30f3\u30b5\u30a4\u30c8\u3084\u30d9\u30b9\u30c8 \u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u3092\u5f97\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u8aad\u3080:&nbsp;<strong>\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/strong>\u306f\u3001\u6700\u65b0\u306e\u6a5f\u80fd\u3068\u5909\u66f4\u3092\u53cd\u6620\u3059\u308b\u305f\u3081\u306b\u983b\u7e41\u306b\u66f4\u65b0\u3055\u308c\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2<strong>.\u5b9f\u8df5\u3068\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u69cb\u7bc9<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u500b\u4eba\u7684\u306a\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u69cb\u7bc9\u3059\u308b<\/strong>: \u72ec\u81ea\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u3066\u5b66\u3093\u3060\u3053\u3068\u3092\u5b9f\u8df5\u3057\u3001\u7d99\u7d9a\u7684\u306b\u6539\u5584\u304a\u3088\u3073\u5f37\u5316\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u53c2\u52a0\u3059\u308b: GitHub\u306a\u3069\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067\u95a2\u5fc3\u306e\u3042\u308b<strong>\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30d7\u30ed\u30b8\u30a7\u30af\u30c8<\/strong>\u3092\u898b\u3064\u3051\u3001\u8ca2\u732e\u306b\u53c2\u52a0\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u81ea\u5206<strong>\u306b\u6311\u6226\u3059\u308b<\/strong>: \u65b0\u3057\u3044\u30c6\u30af\u30ce\u30ed\u30b8\u30fc\u3092\u8a66\u3057\u3001\u3088\u308a\u8907\u96d1\u306a\u554f\u984c\u3092\u89e3\u6c7a\u3057\u3066\u3001\u81ea\u5206\u81ea\u8eab\u306b\u6311\u6226\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">3<strong>.\u30cd\u30c3\u30c8\u30ef\u30fc\u30ad\u30f3\u30b0\u3068\u793e\u4ea4\u3092\u5f37\u5316\u3059\u308b<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u30df\u30fc\u30c8\u30a2\u30c3\u30d7\u3084\u4f1a\u8b70\u306b\u53c2\u52a0\u3059\u308b<\/strong>: \u4ef2\u9593\u3068\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30ad\u30f3\u30b0\u306f\u3001\u30b9\u30ad\u30eb\u3092\u5411\u4e0a\u3055\u305b\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u62e1\u5927\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u30bd\u30fc\u30b7\u30e3\u30eb\u30e1\u30c7\u30a3\u30a2\u30b0\u30eb\u30fc\u30d7\u3084\u30d5\u30a9\u30fc\u30e9\u30e0\u306b\u53c2\u52a0\u3059\u308b<\/strong>:\u3053\u308c\u306f\u3001\u5fd7\u3092\u540c\u3058\u304f\u3059\u308b\u4eba\u3005\u3068\u4ea4\u6d41\u3057\u3001\u30b5\u30dd\u30fc\u30c8\u3092\u5f97\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">4.<strong>\u96a3\u63a5\u3059\u308b\u30b9\u30ad\u30eb\u3068\u30c6\u30af\u30cb\u30c3\u30af\u3092\u5b66\u3076<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5b66\u7fd2\u72b6\u614b\u7ba1\u7406\u30e9\u30a4\u30d6\u30e9\u30ea\u3001\u30c6\u30b9\u30c8 \u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306a\u3069\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u30c4\u30fc\u30eb<strong>\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059<\/strong>\u3002<\/li>\n\n\n\n<li>\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u958b\u767a\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3001DevOps\u306a\u3069\u3092\u542b\u3080<strong>\u30d5\u30eb\u30b9\u30bf\u30c3\u30af\u958b\u767a\u306b\u3064\u3044\u3066\u5b66\u3073<\/strong>\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">5<strong>.\u6559\u80b2\u3068\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u306b\u6295\u8cc7\u3059\u308b<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u30aa\u30f3\u30e9\u30a4\u30f3\u30b3\u30fc\u30b9\u3068\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb<\/strong>:\u591a\u304f\u306e\u6709\u6599\u304a\u3088\u3073\u7121\u6599\u306e\u30ea\u30bd\u30fc\u30b9\u304b\u3089\u9078\u629e\u3067\u304d\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u8a8d\u5b9a\u3092\u53d7\u3051\u308b<\/strong>: \u4e00\u90e8\u306e\u7d44\u7e54\u3067\u306f\u3001\u7279\u5b9a\u306e\u30b9\u30ad\u30eb\u3068\u77e5\u8b58\u3092\u691c\u8a3c\u3059\u308b\u305f\u3081\u306e\u5c02\u9580\u7684\u306a\u8a8d\u5b9a\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8981<\/h3>\n\n\n\n<p>\u30c6\u30af\u30ce\u30ed\u30b8\u30fc\u306e\u5206\u91ce\u3067\u306f\u3001\u7d99\u7d9a\u7684\u306a\u5b66\u7fd2\u3068\u958b\u767a\u304c\u6210\u529f\u3078\u306e\u9375\u3067\u3059\u3002 \u6700\u65b0\u306e\u30c6\u30af\u30ce\u30ed\u30b8\u30fc\u3068\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u3092\u6700\u65b0\u306e\u72b6\u614b\u306b\u4fdd\u3061\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u7a4d\u6975\u7684\u306b\u5b9f\u8df5\u304a\u3088\u3073\u69cb\u7bc9\u3057\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3068\u793e\u4ea4\u3092\u5f37\u5316\u3057\u3001\u6559\u80b2\u3068\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u306b\u6295\u8cc7\u3059\u308b\u3053\u3068\u3067\u3001\u958b\u767a\u8005\u306f\u30b9\u30ad\u30eb\u3068\u77e5\u8b58\u3092\u6700\u65b0\u306e\u72b6\u614b\u306b\u4fdd\u3064\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u7d50\u8ad6\u3067\u306f\u3001\u3053\u308c\u3089\u306e\u624b\u9806\u3092\u5b9f\u884c\u3059\u308b\u3088\u3046\u306b\u8074\u8846\u306b\u4fc3\u3057\u3001\u7d99\u7d9a\u7684\u306a\u5b66\u7fd2\u3068\u500b\u4eba\u306e\u6210\u9577\u306e\u91cd\u8981\u6027\u3092\u5f37\u8abf\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u3001\u5f7c\u3089\u304c\u5f7c\u3089\u306e\u30ad\u30e3\u30ea\u30a2\u3067\u6210\u529f\u3059\u308b\u306e\u306b\u5f79\u7acb\u3064\u3060\u3051\u3067\u306a\u304f\u3001\u958b\u767a\u8005\u3068\u3057\u3066\u306e\u5f7c\u3089\u306e\u6e80\u8db3\u5ea6\u3068\u5145\u5b9f\u611f\u3092\u9ad8\u3081\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/chat.openai.com\/_next\/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAAcHTtdQvKTfcfwR0bXrfLjIN0Vmoln5pVObYXE2hRFieJsISok%3Ds96-c&amp;w=96&amp;q=75\" alt=\"User\"\/><\/figure>\n\n\n\n<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u8a73\u7d30\u306b\u8aac\u660e\u3057\u3066\u8981\u7d04\u3057\u3066\u304f\u3060\u3055\u3044ChatGPT<\/p>\n\n\n\n<p>\u3082\u3061\u308d\u3093\u3067\u3059\uff01 \u6b21\u306b\u793a\u3059\u306e\u306f\u3001\u3053\u306e Next.js \u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u8981\u7d04\u3057\u305f\u4f8b\u3067\u3001\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u53d6\u308a\u4e0a\u3052\u308b\u3055\u307e\u3056\u307e\u306a\u5074\u9762\u3092\u8981\u7d04\u3057\u3001\u305d\u306e\u91cd\u8981\u6027\u3068\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u4fa1\u5024\u3092\u5f37\u8abf\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7d39\u4ecb<\/h3>\n\n\n\n<p>\u6982\u8981\u3067\u306f\u3001Next \u306e\u57fa\u672c\u7684\u306a\u6982\u5ff5\u3068\u5229\u70b9.js\u304a\u3088\u3073\u958b\u767a\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3068\u3057\u3066 [\u6b21\u3078.js \u3092\u9078\u629e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u7406\u7531\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002 \u307e\u305f\u3001Next.js \u306e\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u306b\u3064\u3044\u3066\u3082\u8aac\u660e\u3057\u3001\u5b9f\u969b\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u59cb\u3081\u308b\u524d\u306b<\/h3>\n\n\n\n<p>Node.js \u3068 npm \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u542b\u3080\u958b\u767a\u74b0\u5883\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u3001\u6700\u521d\u306e Next .js \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u4f5c\u6210\u624b\u9806\u3092\u8aac\u660e\u3057\u3001\u5f8c\u7d9a\u306e\u30ec\u30c3\u30b9\u30f3\u306e\u5f37\u56fa\u306a\u57fa\u76e4\u3092\u7bc9\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30da\u30fc\u30b8\u3068\u30eb\u30fc\u30c8<\/h3>\n\n\n\n<p>\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u57fa\u672c\u64cd\u4f5c\u3001\u30da\u30fc\u30b8\u306e\u4f5c\u6210\u3068\u7de8\u6210\u3001\u52d5\u7684\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u4f7f\u7528\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u3001Next.js\u306e\u30b3\u30a2\u6982\u5ff5\u3092\u7406\u89e3\u3059\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3068 CSS<\/h3>\n\n\n\n<p>React\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u4f7f\u7528\u65b9\u6cd5\u3068\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306eCSS\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u7d71\u5408\u3059\u308b\u65b9\u6cd5\u3092\u5b66\u3076\u3053\u3068\u3067\u3001\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u958b\u767a\u30b9\u30ad\u30eb\u3092\u5f37\u5316\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30c7\u30fc\u30bf\u30fb\u30a2\u30af\u30a4\u30b8\u30b7\u30e7\u30f3<\/h3>\n\n\n\n<p>\u4fdd\u5b58\u30c7\u30fc\u30bf\u306e\u53d6\u5f97\u3001\u30b5\u30fc\u30d0\u30fc\u5074\u30c7\u30fc\u30bf\u306e\u53d6\u5f97\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u306e\u30c7\u30fc\u30bf\u53d6\u5f97\u3092\u4f7f\u7528\u3057\u3066\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u3088\u308a\u67d4\u8edf\u304b\u3064\u5f37\u529b\u306b\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3057\u305f\u3002<code>getStaticProps<\/code><code>getServerSideProps<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">API \u30eb\u30fc\u30c6\u30a3\u30f3\u30b0<\/h3>\n\n\n\n<p>API\u30eb\u30fc\u30c8\u306e\u4f5c\u6210\u3001API\u30eb\u30fc\u30c8\u306e\u51e6\u7406\u3001\u304a\u3088\u3073\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u958b\u767a\u6a5f\u80fd\u3092\u5f37\u5316\u3059\u308b\u305f\u3081\u306e\u5916\u90e8API\u306e\u7d71\u5408\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6700\u9069\u5316\u3068\u30c7\u30d7\u30ed\u30a4<\/h3>\n\n\n\n<p>\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u6700\u9069\u5316\u624b\u6cd5\u3001\u9759\u7684\u751f\u6210\u3068\u30b5\u30fc\u30d0\u30fc \u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3001\u304a\u3088\u3073 Vercel \u307e\u305f\u306f\u305d\u306e\u4ed6\u306e\u30db\u30b9\u30c6\u30a3\u30f3\u30b0 \u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306b\u30c7\u30d7\u30ed\u30a4\u3057\u3066\u30a2\u30d7\u30ea\u3092\u904b\u7528\u54c1\u8cea\u306b\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u9ad8\u5ea6\u306a\u30c6\u30fc\u30de<\/h3>\n\n\n\n<p>\u307e\u305f\u3001\u56fd\u969b\u5316\u3001\u74b0\u5883\u5909\u6570\u3001\u30ab\u30b9\u30bf\u30e0\u30b5\u30fc\u30d0\u30fc\u3068\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3001TypeScript\u306e\u4f7f\u7528\u306a\u3069\u306e\u9ad8\u5ea6\u306a\u30c8\u30d4\u30c3\u30af\u306b\u3064\u3044\u3066\u3082\u8aac\u660e\u3057\u3001\u3055\u3089\u306b\u958b\u767a\u3059\u308b\u305f\u3081\u306e\u30c4\u30fc\u30eb\u3068\u65b9\u6cd5\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7d50\u8ad6<\/h3>\n\n\n\n<p>Next.js\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u3068\u30ea\u30bd\u30fc\u30b9\u306e\u91cd\u8981\u6027\u3092\u5f37\u8abf\u3057\u3001\u7d99\u7d9a\u7684\u306a\u5b66\u7fd2\u3068\u958b\u767a\u3078\u306e\u9053\u3092\u63d0\u4f9b\u3057\u3001\u63a2\u6c42\u3068\u6210\u9577\u3092\u5968\u52b1\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6982\u8981<\/h3>\n\n\n\n<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f.js\u57fa\u672c\u7684\u306a\u6982\u5ff5\u304b\u3089\u9ad8\u5ea6\u306a\u30c6\u30af\u30cb\u30c3\u30af\u307e\u3067\u3001Next \u306e\u3059\u3079\u3066\u306e\u5074\u9762\u3092\u5305\u62ec\u7684\u304b\u3064\u8a73\u7d30\u306b\u8aac\u660e\u3057\u307e\u3059\u3002 \u59cb\u3081\u305f\u3070\u304b\u308a\u3067\u3082\u3001\u30b9\u30ad\u30eb\u3092\u5411\u4e0a\u3055\u305b\u305f\u3044\u5834\u5408\u3067\u3082\u3001\u305d\u306e\u6069\u6075\u3092\u53d7\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u304c\u3001Next .js\u3092\u30de\u30b9\u30bf\u30fc\u3059\u308b\u306e\u306b\u5f79\u7acb\u3064\u3060\u3051\u3067\u306a\u304f\u3001\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u958b\u767a\u3078\u306e\u71b1\u610f\u3068\u8208\u5473\u3092\u523a\u6fc0\u3059\u308b\u3053\u3068\u3092\u9858\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3054\u53c2\u52a0\u3044\u305f\u3060\u304d\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002\u6b21\u306e.js\u304a\u3088\u3073\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u958b\u767a\u3078\u306e\u65c5\u3067\u3055\u3089\u306b\u6210\u529f\u3059\u308b\u306e\u3092\u697d\u3057\u307f\u306b\u3057\u3066\u3044\u307e\u3059!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>IT\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u30d3\u30c7\u30aa\u3092\u3084\u308a\u305f\u3044\u306e\u3067 &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_mi_skip_tracking":false,"footnotes":""},"categories":[23],"tags":[],"class_list":["post-2840","post","type-post","status-publish","format-standard","hentry","category-material"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/edu.ujhb.org\/index.php?rest_route=\/wp\/v2\/posts\/2840","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/edu.ujhb.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/edu.ujhb.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/edu.ujhb.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/edu.ujhb.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2840"}],"version-history":[{"count":1,"href":"https:\/\/edu.ujhb.org\/index.php?rest_route=\/wp\/v2\/posts\/2840\/revisions"}],"predecessor-version":[{"id":2841,"href":"https:\/\/edu.ujhb.org\/index.php?rest_route=\/wp\/v2\/posts\/2840\/revisions\/2841"}],"wp:attachment":[{"href":"https:\/\/edu.ujhb.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2840"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edu.ujhb.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2840"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edu.ujhb.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2840"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}