{"id":502,"date":"2024-03-13T18:00:08","date_gmt":"2024-03-13T09:00:08","guid":{"rendered":"https:\/\/blog.fundely.co.jp\/tech\/?p=502"},"modified":"2024-04-09T10:46:30","modified_gmt":"2024-04-09T01:46:30","slug":"next-js%e3%81%a7todo%e3%82%a2%e3%83%97%e3%83%aa%e3%82%92%e4%bd%9c%e3%82%8d%e3%81%86","status":"publish","type":"post","link":"https:\/\/blog.fundely.co.jp\/tech\/2024\/03\/13\/next-js%e3%81%a7todo%e3%82%a2%e3%83%97%e3%83%aa%e3%82%92%e4%bd%9c%e3%82%8d%e3%81%86\/","title":{"rendered":"Next.js\u3067ToDo\u30a2\u30d7\u30ea\u3092\u4f5c\u308d\u3046!"},"content":{"rendered":"\n<p>\u3053\u3093\u306b\u3061\u306f\u3002\u30c7\u30b6\u30a4\u30f3\u30fb\u30b7\u30b9\u30c6\u30e0\u5ba4\u306e\u59bb\u91ce\u3067\u3059\u3002<br>\u79c1\u306f\u6628\u5e7410\u6708\u306b\u672a\u7d4c\u9a13\u3067\u5165\u793e\u3057\u3001\u5f0a\u793e\u30b5\u30fc\u30d3\u30b9\u300c\u65ec\u3092\u3059\u3050\u306b\u300d\u306e\u30b7\u30b9\u30c6\u30e0\u958b\u767a\u306b\u643a\u308f\u3063\u3066\u3044\u307e\u3059\u3002<br>\u7814\u4fee\u3067\u7c21\u5358\u306aToDo\u30a2\u30d7\u30ea\u3092\u4f5c\u6210\u3057\u305f\u306e\u3067\u3001\u305d\u306e\u5185\u5bb9\u3092\u7d39\u4ecb\u3067\u304d\u308c\u3070\u3068\u601d\u3044\u307e\u3059\u3002                                                                                                                                                                  \u4f7f\u7528\u6280\u8853\u306fNext.js\uff08\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u8a00\u8a9e\uff09\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">Next.js\u3068\u306f\uff1f<\/span><\/h2>\n\n\n\n<p>Next.js\u3068\u306fVercel\u793e\u304c\u958b\u767a\u3057\u305fReact\u3092\u57fa\u790e\u3068\u3057\u305f\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3059\u3002\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3084\u9759\u7684Web\u30b5\u30a4\u30c8\u306e\u958b\u767a\u3092\u7c21\u5358\u304b\u3064\u52b9\u7387\u7684\u306b\u884c\u306a\u3046\u3053\u3068\u3092\u76ee\u7684\u3068\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>React\u306fUI\uff08\u30e6\u30fc\u30b6\u30fc\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\uff09\u306b\u9577\u3051\u3066\u3044\u308b\u306e\u306b\u5bfe\u3057\u3001Next.js\u306f\u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9\u6a5f\u80fd\u306b\u512a\u308c\u3001\u30da\u30fc\u30b8\u9077\u79fb\u306e\u591a\u3044\u5927\u898f\u6a21\u306aWeb\u30b5\u30a4\u30c8\u3084\u3001\u9ad8\u901f\u3067\u5feb\u9069\u306aWeb\u30a2\u30d7\u30ea\u3092\u958b\u767a\u3059\u308b\u5834\u5408\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u3002React\u306e\u89e3\u8aac\u306f\u4e0b\u8a18\u6295\u7a3f\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-akabane-tech-blog wp-block-embed-akabane-tech-blog\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"v7VT1RUU3o\"><a href=\"https:\/\/blog.fundely.co.jp\/tech\/2023\/03\/08\/react-mui-v5material-ui\/\">React + MUI v5(Material-UI)<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;React + MUI v5(Material-UI)&#8221; &#8212; AKABANE TECH BLOG\" src=\"https:\/\/blog.fundely.co.jp\/tech\/2023\/03\/08\/react-mui-v5material-ui\/embed\/#?secret=C9gUVD9V5B#?secret=v7VT1RUU3o\" data-secret=\"v7VT1RUU3o\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"512\" src=\"https:\/\/blog.fundely.co.jp\/tech\/wp-content\/uploads\/sites\/2\/2024\/03\/next-1024x512.jpeg\" alt=\"\" class=\"wp-image-510\" title=\"img\" srcset=\"https:\/\/blog.fundely.co.jp\/tech\/wp-content\/uploads\/sites\/2\/2024\/03\/next-1024x512.jpeg 1024w, https:\/\/blog.fundely.co.jp\/tech\/wp-content\/uploads\/sites\/2\/2024\/03\/next-300x150.jpeg 300w, https:\/\/blog.fundely.co.jp\/tech\/wp-content\/uploads\/sites\/2\/2024\/03\/next-768x384.jpeg 768w, https:\/\/blog.fundely.co.jp\/tech\/wp-content\/uploads\/sites\/2\/2024\/03\/next.jpeg 1400w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">1.\u5b8c\u6210\u5f62<\/span><\/h3>\n\n\n\n<p>\u307e\u305a\u521d\u3081\u306b\u5b8c\u6210\u5f62\u3092\u304a\u898b\u305b\u3057\u307e\u3059\u3002                                                                                                               \u300cAdd Card\u300d\u3092\u62bc\u3059\u3068\u30ab\u30fc\u30c9\u304c\u8ffd\u52a0\u3055\u308c\u3001\u300cComplete\u300d\u3092\u62bc\u3059\u3068\u5185\u5bb9\u304c\u6d88\u3048\u308b\u7c21\u5358\u306a\u30a2\u30d7\u30ea\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"469\" src=\"https:\/\/blog.fundely.co.jp\/tech\/wp-content\/uploads\/sites\/2\/2024\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-03-06-10.06.27-1024x469.png\" alt=\"\" class=\"wp-image-525\" srcset=\"https:\/\/blog.fundely.co.jp\/tech\/wp-content\/uploads\/sites\/2\/2024\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-03-06-10.06.27-1024x469.png 1024w, https:\/\/blog.fundely.co.jp\/tech\/wp-content\/uploads\/sites\/2\/2024\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-03-06-10.06.27-300x137.png 300w, https:\/\/blog.fundely.co.jp\/tech\/wp-content\/uploads\/sites\/2\/2024\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-03-06-10.06.27-768x352.png 768w, https:\/\/blog.fundely.co.jp\/tech\/wp-content\/uploads\/sites\/2\/2024\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-03-06-10.06.27-1536x703.png 1536w, https:\/\/blog.fundely.co.jp\/tech\/wp-content\/uploads\/sites\/2\/2024\/03\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-03-06-10.06.27-2048x938.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">2.\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u59cb\u3081\u65b9<\/span><\/h3>\n\n\n\n<p>\u304a\u597d\u304d\u306a\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u6210\u3057\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>npx create-next-app@latest <\/code><\/pre><\/div>\n\n\n\n<p>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u540d\u524d\u3084App Router\u3092\u4f7f\u7528\u3059\u308b\u304b\u306a\u3069\u805e\u304b\u308c\u307e\u3059\u306e\u3067\u4e0b\u306e\u753b\u50cf\u306b\u6cbf\u3063\u3066\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u5168\u3066\u5165\u529b\u3059\u308b\u3068\u3001\u81ea\u52d5\u7684\u306b\u8907\u6570\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>create-next-app@14.1.2\nOk to proceed? (y) \n\u2714 What is your project named? \u2026 todo-app #\u304a\u597d\u304d\u306a\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u540d\u3092\u5165\u308c\u3066\u304f\u3060\u3055\u3044\u3002\n\u2714 Would you like to use TypeScript? \u2026 No \/ Yes #Yes\u3092\u9078\u629e\u3002\n\u2714 Would you like to use ESLint? \u2026 No \/ Yes\u3000#Yes\u3092\u9078\u629e\u3002\n\u2714 Would you like to use Tailwind CSS? \u2026 No \/ Yes #Yes\u3092\u9078\u629e\u3002\n\u2714 Would you like to use `src\/` directory? \u2026 No \/ Yes #No\u3092\u9078\u629e\u3002\n\u2714 Would you like to use App Router? (recommended) \u2026 No \/ Yes\u3000#Yes\u3092\u9078\u629e\u3002\n\u2714 Would you like to customize the default import alias (@\/*)? \u2026 No \/ Yes\u3000#Yes\u3092\u9078\u629e<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">3.\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u8d77\u52d5\u65b9\u6cd5<\/span><\/h3>\n\n\n\n<p>\u6b21\u306f\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>cd todo-app\u3000#\u4f5c\u6210\u3057\u305f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u540d\uff08\u3053\u3053\u3067\u306ftodo-app\uff09<\/code><\/pre><\/div>\n\n\n\n<p>\u305d\u306e\u5f8c\u3001\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068Next.js\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>npm run dev<\/code><\/pre><\/div>\n\n\n\n<p>\u30d6\u30e9\u30a6\u30b6\u306b\u3066\u300c<a href=\"http:\/\/localhost:3000\/\">http:\/\/localhost:3000\/<\/a>\u300d\u3092\u5165\u529b\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u305d\u3057\u3066\u4e0b\u8a18\u753b\u50cf\u304c\u51fa\u308c\u3070\u6210\u529f\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"832\" src=\"https:\/\/blog.fundely.co.jp\/tech\/wp-content\/uploads\/sites\/2\/2024\/03\/e19b3c80e680-20230628-1024x832.png\" alt=\"\" class=\"wp-image-521\" srcset=\"https:\/\/blog.fundely.co.jp\/tech\/wp-content\/uploads\/sites\/2\/2024\/03\/e19b3c80e680-20230628-1024x832.png 1024w, https:\/\/blog.fundely.co.jp\/tech\/wp-content\/uploads\/sites\/2\/2024\/03\/e19b3c80e680-20230628-300x244.png 300w, https:\/\/blog.fundely.co.jp\/tech\/wp-content\/uploads\/sites\/2\/2024\/03\/e19b3c80e680-20230628-768x624.png 768w, https:\/\/blog.fundely.co.jp\/tech\/wp-content\/uploads\/sites\/2\/2024\/03\/e19b3c80e680-20230628.png 1400w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">4.\u4e8b\u524d\u6e96\u5099<\/span><\/h3>\n\n\n\n<p>\u5b9f\u969b\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\u524d\u306b\u30b9\u30bf\u30a4\u30eb\u306e\u9069\u7528\u3092\u6291\u5236\u3057\u307e\u3059\u3002app\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u914d\u4e0b\u306e\u300cglobals.css\u300d\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u4e0b\u8a18\u306e\u3088\u3046\u306b\u4fee\u6b63\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\" data-file=\"globals.css\"><code>@tailwind base;\n@tailwind components;\n@tailwind utilities;<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">5.\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u958b\u767a<\/span><\/h3>\n\n\n\n<p>Next.js\u306f\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u6307\u5411\u306e\u8a00\u8a9e\u3067\u3059\u3002\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3068\u306f\u3001\u518d\u5229\u7528\u53ef\u80fd\u306a\u90e8\u54c1\u3067\u3042\u308a\u30a6\u30a7\u30d6\u30da\u30fc\u30b8\u3092\u69cb\u6210\u3059\u308b\u8981\u7d20\u306e\u3053\u3068\u3067\u3059\u3002\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u4f8b\u3048\u3070\u3001\u30d8\u30c3\u30c0\u30fc\u3001\u30d5\u30c3\u30bf\u30fc\u3001\u30e1\u30a4\u30f3\u30b3\u30f3\u30c6\u30f3\u30c4\u306a\u3069\u304c\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306b\u306a\u308a\u307e\u3059\u3002\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u30a6\u30a7\u30d6\u30da\u30fc\u30b8\u3092\u69cb\u6210\u3059\u308b\u8981\u7d20\u3092\u518d\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u672c\u30a2\u30d7\u30ea\u3067\u3082\u6a5f\u80fd\u5225\u306b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u5206\u3051\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000app\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u914d\u4e0b\u306b\u300ccomponents\u300d\u3068\u3044\u3046\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u305d\u306e\u4e2d\u306b\u300cCard.tsx\u300d\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3068\u300cList.tsx\u300d\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u4f5c\u6210\u3057\u305f\u3089\u4e0b\u8a18\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\" data-file=\"Card.tsx\"><code>import { useState } from &#39;react&#39;;\n\ninterface CardProps {\n  card: {\n    id: number;\n    title: string;\n    description: string;\n  };\n  onDelete: () =&gt; void;\n}\n\nconst Card: React.FC&lt;CardProps&gt; = ({ card, onDelete }) =&gt; {\n  const [title, setTitle] = useState(card.title);\n  const [description, setDescription] = useState(card.description);\n\n  \/\/ \u30ab\u30fc\u30c9\u306e\u30bf\u30a4\u30c8\u30eb\u3092\u66f4\u65b0\u3059\u308b\u95a2\u6570\n  const handleTitleChange = (e: React.ChangeEvent&lt;HTMLInputElement&gt;) =&gt; {\n    setTitle(e.target.value);\n  };\n\n  \/\/ \u30ab\u30fc\u30c9\u306e\u8aac\u660e\u3092\u66f4\u65b0\u3059\u308b\u95a2\u6570\n  const handleDescriptionChange = (e: React.ChangeEvent&lt;HTMLTextAreaElement&gt;) =&gt; {\n    setDescription(e.target.value);\n  };\n\n  return (\n    &lt;div className=&quot;bg-white rounded shadow p-3 mb-2&quot;&gt;\n      &lt;button className=&quot;float-right text-red-600&quot; onClick={onDelete}&gt;Complete&lt;\/button&gt;\n      &lt;input type=&quot;text&quot; value={title} onChange={handleTitleChange} className=&quot;w-full mb-2 border-b focus:outline-none focus:border-blue-500&quot; \/&gt;\n      &lt;textarea value={description} onChange={handleDescriptionChange} className=&quot;w-full border rounded focus:outline-none focus:border-blue-500&quot; \/&gt;\n    &lt;\/div&gt;\n  );\n};\n\nexport default Card;\n<\/code><\/pre><\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\" data-file=\"List.tsx\"><code>&#39;use client&#39;;\nimport { useState } from &#39;react&#39;;\nimport Card from &#39;.\/Card&#39;;\n\ninterface ListProps {\n  title: string;\n}\n\ninterface CardData {\n  id: number;\n  title: string;\n  description: string;\n}\n\nconst List: React.FC&lt;ListProps&gt; = ({ title }) =&gt; {\n  const [cards, setCards] = useState&lt;CardData[]&gt;([]);\n\n  \/\/ \u30ab\u30fc\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u95a2\u6570\n  const addCard = () =&gt; {\n    const newCard: CardData = {\n      id: cards.length + 1,\n      title: `Task ${cards.length + 1}`,\n      description: &#39;&#39;\n    };\n    setCards([...cards, newCard]);\n  };\n\n  \/\/ \u30ab\u30fc\u30c9\u3092\u524a\u9664\u3059\u308b\u95a2\u6570\n  const deleteCard = (id: number) =&gt; {\n    setCards(cards.filter(card =&gt; card.id !== id));\n  };\n\n  return (\n    &lt;div className=&quot;p-4 border rounded shadow&quot;&gt;\n      &lt;h2 className=&quot;text-lg font-bold mb-4&quot;&gt;{title}&lt;\/h2&gt;\n      &lt;button className=&quot;mb-2 px-3 py-1 bg-blue-500 text-white rounded hover:bg-blue-600&quot; onClick={addCard}&gt;Add Card&lt;\/button&gt;\n      {cards.map(card =&gt; (\n        &lt;Card key={card.id} card={card} onDelete={() =&gt; deleteCard(card.id)} \/&gt;\n      ))}\n    &lt;\/div&gt;\n  );\n};\n\nexport default List;\n<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">6.\u753b\u9762\u3078\u306e\u8868\u793a<\/span><\/h3>\n\n\n\n<p>\u6700\u5f8c\u306bapp\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u914d\u4e0b\u306e\u300cpage.tsx\u300d\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u8eab\u3092\u5168\u3066\u6d88\u3057\u307e\u3059\u3002\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u305d\u308c\u304b\u3089\u4e0b\u8a18\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\" data-file=\"page.tsx\"><code>import List from &quot;@\/components\/List&quot;;\n\nconst Home: React.FC = () =&gt; {\n  return(\n  &lt;div&gt;\n    &lt;List title=&quot;To Do&quot; \/&gt;\n    &lt;List title=&quot;In Progress&quot; \/&gt;\n    &lt;List title=&quot;Done&quot; \/&gt;\n  &lt;\/div&gt;\n  );\n};\n\nexport default Home;<\/code><\/pre><\/div>\n\n\n\n<p>\u3053\u3053\u307e\u3067\u8a18\u8ff0\u3057\u305f\u3089\u5909\u66f4\u5185\u5bb9\u3092\u4fdd\u5b58\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u5192\u982d\u306e\u30a2\u30d7\u30ea\u304c\u5b8c\u6210\u3057\u3066\u3044\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">7.\u30dd\u30a4\u30f3\u30c8<\/span><\/h3>\n\n\n\n<p>\u30dd\u30a4\u30f3\u30c8\u306f\u300cList.tsx\u300d\u306e\u524d\u534a\u90e8\u5206\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\" data-file=\"List.tsx\"><code>&#39;use client&#39;;\nimport { useState } from &#39;react&#39;;\nimport Card from &#39;.\/Card&#39;;\n\ninterface ListProps {\n  title: string;\n}\n\ninterface CardData {\n  id: number;\n  title: string;\n  description: string;\n}\n\n~\u7701\u7565~\n<\/code><\/pre><\/div>\n\n\n\n<p>\u307e\u305a\u306f\u3001\u300c&#8217;use client&#8217;\u300d\u3068\u3044\u3046\u8868\u8a18\u3067\u3059\u3002\u3053\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306fState\u3092\u4f7f\u3063\u3066\u3044\u308b\u305f\u3081\uff08\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u306e\u60c5\u5831\uff09\u3053\u306e\u8868\u8a18\u3092\u3057\u306a\u3044\u3068\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u6b21\u306b\u3001\u300cimport~\u300d\u3068\u3044\u3046\u6587\u304c\u3042\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002\u3053\u3061\u3089\u306f\u4e3b\u306bReact\u306e\u6a5f\u80fd\u3084\u5225\u30d5\u30a1\u30a4\u30eb\u306eCard.tsx\u306e\u5185\u5bb9\u3092import\u3057\u3001\u4f7f\u7528\u53ef\u80fd\u306a\u72b6\u614b\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u6700\u5f8c\u306b\u300cinterface\u300d\u3067\u3059\u304c\u3001\u7c21\u5358\u306b\u3044\u3046\u3068\u300c\u578b\u5b9a\u7fa9\u300d\u3067\u3059\u3002\u672c\u30a2\u30d7\u30ea\u306fTypeScript\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u3053\u306e\u5b9a\u7fa9\u304c\u5fc5\u8981\u3067\u3059\u3002\uff08\u578b\u5b9a\u7fa9\u3092\u3057\u306a\u3044\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\uff09TypeScript\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u3068\u30a8\u30e9\u30fc\u306a\u3069\u304c\u767a\u898b\u3057\u3084\u3059\u3044\u89b3\u70b9\u304b\u3089\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u958b\u767a\u306b\u3066\u91cd\u5b9d\u3055\u308c\u3066\u3044\u307e\u3059\u3002 <\/p>\n\n\n\n<p>\u8aac\u660e\u3092\u7701\u7565\u3057\u305f\u90e8\u5206\u304c\u591a\u3005\u3042\u308a\u307e\u3057\u305f\u3002\u4ee5\u4e0b\u53c2\u8003\u306b\u306a\u308b\u8a18\u4e8b\u3067\u3059\u306e\u3067\u305c\u3072\u3054\u89a7\u304f\u3060\u3055\u3044\u3002\u3000\u3000\u3000\u3000\u3000\u3000\u3000<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/zenn.dev\/luvmini511\/articles\/ec0e874a2cc1f1\" title=\"use client\u306b\u95a2\u3059\u308b\u8a18\u4e8b\">https:\/\/zenn.dev\/luvmini511\/articles\/ec0e874a2cc1f1<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/zenn.dev\/kisukeyas\/articles\/747123336f8b32\" title=\"import\/export\u306b\u3064\u3044\u3066\">https:\/\/zenn.dev\/kisukeyas\/articles\/747123336f8b32<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/zenn.dev\/hinoshin\/articles\/87b99f4ddc2729\" title=\"TypeScript\u306b\u3064\u3044\u3066\">https:\/\/zenn.dev\/hinoshin\/articles\/87b99f4ddc2729<\/a><\/li>\n<\/ul>\n\n\n\n<p>Next.js\u306fVercel\u793e\u304c\u958b\u767a\u3057\u305f\u3082\u306e\u3067\u30c7\u30d7\u30ed\u30a4\uff08\u5b9f\u969b\u306eWeb\u30b5\u30fc\u30d0\u30fc\u4e0a\u306b\u914d\u7f6e\u3057\u3066\u3001\u5229\u7528\u3067\u304d\u308b\u72b6\u614b\uff09\u304c\u5bb9\u6613\u306e\u305f\u3081\u4eba\u6c17\u304c\u3042\u308b\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3059\u3002\u305c\u3072\u30dd\u30fc\u30c8\u30d5\u30a9\u30ea\u30aa\u7b49\u3001\u500b\u4eba\u958b\u767a\u3057\u3001\u516c\u958b\u3057\u3066\u307f\u308b\u306e\u306f\u3044\u304b\u304c\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u3055\u3044\u3054\u306b<\/h2>\n\n\n\n<p>\u73fe\u5728\u30c7\u30b6\u30a4\u30f3\u30fb\u30b7\u30b9\u30c6\u30e0\u5ba4\u3067\u306f\u3001\u65b0\u3057\u3044\u30e1\u30f3\u30d0\u30fc\u3092\u52df\u96c6\u3057\u3066\u3044\u307e\u3059\u3002\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000 \u5c11\u3057\u3067\u3082\u8208\u5473\u3092\u6301\u305f\u308c\u305f\u65b9\u306f\u3001\u305c\u3072\u3054\u5fdc\u52df\u304f\u3060\u3055\u3044\u3002<br>\u7686\u69d8\u304b\u3089\u306e\u3054\u5fdc\u52df\u3001\u5fc3\u3088\u308a\u304a\u5f85\u3061\u3057\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button aligncenter is-style-fill\"><a class=\"wp-block-button__link has-vivid-green-cyan-background-color has-background wp-element-button\" href=\"https:\/\/blog.fundely.co.jp\/tech\/?page_id=82&amp;preview=true\" style=\"border-radius:12px\">\u52df\u96c6\u8981\u9805\u304a\u3088\u3073\u30a8\u30f3\u30c8\u30ea\u30fc\u30d5\u30a9\u30fc\u30e0<\/a><\/div>\n<\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3002\u30c7\u30b6\u30a4\u30f3\u30fb\u30b7\u30b9\u30c6\u30e0\u5ba4\u306e\u59bb\u91ce\u3067\u3059\u3002\u79c1\u306f\u6628\u5e7410\u6708\u306b\u672a\u7d4c\u9a13\u3067\u5165\u793e\u3057\u3001\u5f0a\u793e\u30b5\u30fc\u30d3\u30b9\u300c\u65ec\u3092\u3059\u3050\u306b\u300d\u306e\u30b7\u30b9\u30c6\u30e0\u958b\u767a\u306b\u643a\u308f\u3063\u3066\u3044\u307e\u3059\u3002\u7814\u4fee\u3067\u7c21\u5358\u306aToDo\u30a2\u30d7\u30ea\u3092\u4f5c\u6210\u3057\u305f\u306e\u3067\u3001\u305d\u306e\u5185\u5bb9\u3092\u7d39\u4ecb\u3067\u304d\u308c\u3070\u3068\u601d\u3044\u307e\u3059\u3002 \u4f7f\u7528\u6280\u8853 [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[19],"tags":[20,5],"class_list":["post-502","post","type-post","status-publish","format-standard","hentry","category-next","tag-next-js","tag-react"],"acf":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.fundely.co.jp\/tech\/wp-json\/wp\/v2\/posts\/502","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.fundely.co.jp\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.fundely.co.jp\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.fundely.co.jp\/tech\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.fundely.co.jp\/tech\/wp-json\/wp\/v2\/comments?post=502"}],"version-history":[{"count":20,"href":"https:\/\/blog.fundely.co.jp\/tech\/wp-json\/wp\/v2\/posts\/502\/revisions"}],"predecessor-version":[{"id":595,"href":"https:\/\/blog.fundely.co.jp\/tech\/wp-json\/wp\/v2\/posts\/502\/revisions\/595"}],"wp:attachment":[{"href":"https:\/\/blog.fundely.co.jp\/tech\/wp-json\/wp\/v2\/media?parent=502"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.fundely.co.jp\/tech\/wp-json\/wp\/v2\/categories?post=502"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.fundely.co.jp\/tech\/wp-json\/wp\/v2\/tags?post=502"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}