{"id":1586,"date":"2022-07-06T17:09:19","date_gmt":"2022-07-06T09:09:19","guid":{"rendered":"https:\/\/fromideatocreation.com\/?p=1241"},"modified":"2023-07-02T16:20:26","modified_gmt":"2023-07-02T08:20:26","slug":"%e9%a0%90%e5%85%88%e6%b8%b2%e6%9f%93%e5%92%8c%e6%95%b8%e6%93%9a%e7%8d%b2%e5%8f%96-6","status":"publish","type":"post","link":"https:\/\/fromideatocreation.com\/?p=1586","title":{"rendered":"\u3010NEXT.JS \u7cfb\u5217\u3011\u9810\u5148\u6e32\u67d3\u548c\u6578\u64da\u7372\u53d6 6"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">getStaticProps \u7d30\u7bc0<\/h4>\n\n\n\n<p>\u9019\u662f\u60a8\u61c9\u8a72\u77e5\u9053\u7684\u6709\u95dc getStaticProps \u7684\u4e00\u4e9b\u57fa\u672c\u5167\u5bb9\u3002<\/p>\n\n\n\n<div style=\"height:24px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">\u7372\u53d6\u5916\u90e8 API \u6216\u67e5\u8a62\u8cc7\u6599\u5eab<\/h4>\n\n\n\n<p>\u5728 <code>lib\/posts.js<\/code> \u4e2d\uff0c\u6211\u5011\u5be6\u505a\u4e86\u5f9e\u6a94\u6848\u7cfb\u7d71\u7372\u53d6\u8cc7\u6599\u7684 <code>getSortedPostsData<\/code>\u3002 \u4f46\u662f\u60a8\u53ef\u4ee5\u5f9e\u5176\u4ed6\u4f86\u6e90\u7372\u53d6\u8cc7\u6599\uff0c\u4f8b\u5982\u5916\u90e8 API \u7aef\u9ede\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"jsx\" class=\"language-jsx\">export async function getSortedPostsData() {\n  \/\/ Instead of the file system,\n  \/\/ fetch post data from an external API endpoint\n  const res = await fetch('..');\n  return res.json();\n}<\/code><\/pre>\n\n\n\n<p>\u6ce8\u610f\uff1aNext.js \u5728\u5ba2\u6236\u7aef\u548c\u670d\u52d9\u5668\u4e0a\u90fd\u4f7f\u7528\u4e86 <code>fetch()<\/code>\u3002 \u4f60\u4e0d\u9700\u8981\u532f\u5165\u5b83\u3002<\/p>\n\n\n\n<p>\u4e5f\u53ef\u4ee5\u76f4\u63a5\u67e5\u8a62\u8cc7\u6599\u5eab\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"jsx\" class=\"language-jsx\">import someDatabaseSDK from 'someDatabaseSDK'\n\nconst databaseClient = someDatabaseSDK.createClient(...)\n\nexport async function getSortedPostsData() {\n  \/\/ Instead of the file system,\n  \/\/ fetch post data from a database\n  return databaseClient.query('SELECT posts...')\n}<\/code><\/pre>\n\n\n\n<p>\u9019\u4e9b\u90fd\u80fd\u505a\u5230\uff0c\u56e0\u70ba <code>getStaticProps<\/code> \u50c5\u5728\u670d\u52d9\u5668\u7aef\u904b\u884c\u3002 \u5b83\u6c38\u9060\u4e0d\u6703\u5728\u5ba2\u6236\u7aef\u904b\u884c\u3002 \u5b83\u751a\u81f3\u4e0d\u6703\u5305\u542b\u5728\u700f\u89bd\u5668\u7684 JS \u5305\u88f9\u4e2d\u3002 \u9019\u610f\u5473\u8457\u60a8\u53ef\u4ee5\u7de8\u5beb\u8af8\u5982\u76f4\u63a5\u67e5\u8a62\u8cc7\u6599\u5eab\u4e4b\u985e\u7684\u7a0b\u5f0f\u78bc\uff0c\u800c\u7121\u9700\u5c07\u5b83\u5011\u767c\u9001\u5230\u700f\u89bd\u5668\u3002<\/p>\n\n\n\n<div style=\"height:24px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Development vs. Production<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5728\u958b\u767c\u4e2d\uff08<code>npm run dev<\/code> \u6216 <code>yarn dev<\/code>\uff09\uff0c<code>getStaticProps<\/code> \u5728\u6bcf\u500b\u8acb\u6c42\u4e0a\u904b\u884c\u3002<\/li>\n\n\n\n<li>\u5728\u751f\u7522\u4e2d\uff0c<code>getStaticProps<\/code> \u5728 build time \u5efa\u69cb\u6642\u904b\u884c\u3002 \u4f46\u662f\uff0c\u53ef\u4ee5\u4f7f\u7528 <code><a href=\"https:\/\/nextjs.org\/docs\/basic-features\/data-fetching#getstaticpaths-static-generation\" target=\"_blank\" rel=\"noreferrer noopener\" title=\"getStaticPath\">getStaticPath<\/a>s<\/code> \u8fd4\u56de\u7684 <a href=\"https:\/\/nextjs.org\/docs\/api-reference\/data-fetching\/get-static-paths#fallback-false\" target=\"_blank\" rel=\"noreferrer noopener\" title=\"fallback key\"><code>fallback<\/code> key<\/a> \u4f86\u589e\u5f37\u6b64\u884c\u70ba<\/li>\n<\/ul>\n\n\n\n<p>\u56e0\u70ba\u5b83\u9810\u8a08\u5728\u5efa\u69cb\u6642\u904b\u884c\uff0c\u6240\u4ee5\u60a8\u5c07\u7121\u6cd5\u4f7f\u7528\u50c5\u5728\u8acb\u6c42\u671f\u9593\u53ef\u7528\u7684\u6578\u64da\uff0c\u4f8b\u5982\u67e5\u8a62\u53c3\u6578\u6216 HTTP \u6a19\u982d\u3002<\/p>\n\n\n\n<div style=\"height:24px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">\u50c5\u5141\u8a31\u5728\u9801\u9762\u4e2d<\/h4>\n\n\n\n<p><code>getStaticProps<\/code> \u53ea\u80fd\u5f9e\u9801\u9762\u532f\u51fa\u3002 \u60a8\u4e0d\u80fd\u5f9e\u975e\u9801\u9762\u6587\u4ef6\u4e2d\u532f\u51fa\u5b83\u3002<\/p>\n\n\n\n<p>\u9019\u7a2e\u9650\u5236\u7684\u539f\u56e0\u4e4b\u4e00\u662f React \u9700\u8981\u5728\u5448\u73fe\u9801\u9762\u4e4b\u524d\u64c1\u6709\u6240\u6709\u5fc5\u9700\u7684\u6578\u64da\u3002<\/p>\n\n\n\n<div style=\"height:24px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">\u5982\u679c\u6211\u9700\u8981\u5728 request time \u7372\u53d6\u8cc7\u6599\u600e\u9ebc\u8fa6\uff1f<\/h4>\n\n\n\n<p>\u5982\u679c\u60a8\u4e0d\u80fd\u5728\u7528\u6236\u8acb\u6c42\u4e4b\u524d\u9810\u5148\u6e32\u67d3\u9801\u9762\uff0c\u5247\u975c\u614b\u751f\u6210\u4e0d\u662f\u4e00\u500b\u597d\u4e3b\u610f\u3002 \u4e5f\u8a31\u60a8\u7684\u9801\u9762\u6703\u986f\u793a\u983b\u7e41\u66f4\u65b0\u7684\u6578\u64da\uff0c\u4e26\u4e14\u9801\u9762\u5167\u5bb9\u6703\u96a8\u6bcf\u500b\u8acb\u6c42\u800c\u66f4\u6539\u3002<\/p>\n\n\n\n<p>\u5728\u9019\u7a2e\u60c5\u6cc1\u4e0b\uff0c\u60a8\u53ef\u4ee5\u5617\u8a66\u670d\u52d9\u5668\u7aef\u6e32\u67d3\u6216\u8df3\u904e\u9810\u5148\u6e32\u67d3\u3002 \u5728\u7e7c\u7e8c\u4e0b\u4e00\u8ab2\u4e4b\u524d\uff0c\u8b93\u6211\u5011\u5148\u8ac7\u8ac7\u9019\u4e9b\u7b56\u7565\u3002<\/p>\n\n\n\n<div style=\"height:24px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">\u5728 request time \u7372\u53d6\u8cc7\u6599<\/h4>\n\n\n\n<p>\u5982\u679c\u60a8\u9700\u8981\u5728\u8acb\u6c42\u6642\u800c\u4e0d\u662f\u5728 build time \u5efa\u69cb\u6642\u7372\u53d6\u6578\u64da\uff0c\u60a8\u53ef\u4ee5\u5617\u8a66\u670d\u52d9\u5668\u7aef\u6e32\u67d3\uff1a<\/p>\n\n\n\n<div class=\"wp-block-qubely-image qubely-block-3306ae\"><div class=\"qubely-block-image  qubely-image-layout-simple\"><div class=\"qubely-image-media qubely-vertical-alignment-center qubely-horizontal-alignment-center\"><figure><div class=\"qubely-image-container\"><img decoding=\"async\" class=\"qubely-image-image\" src=\"https:\/\/fromideatocreation.com\/wp-content\/uploads\/2022\/07\/server-side-rendering-with-data.png\" alt=\"\"\/><\/div><\/figure><\/div><\/div><\/div>\n\n\n\n<p>\u8981\u4f7f\u7528\u670d\u52d9\u5668\u7aef\u6e32\u67d3\uff0c\u60a8\u9700\u8981\u5f9e\u9801\u9762\u5c0e\u51fa <code>getServerSideProps<\/code> \u800c\u4e0d\u662f <code>getStaticProps<\/code>\u3002<\/p>\n\n\n\n<div style=\"height:24px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">\u4f7f\u7528 getServerSideProps<\/h4>\n\n\n\n<p>\u9019\u662f <code>getServerSideProps<\/code> \u7684\u8d77\u59cb\u7a0b\u5f0f\u78bc\u3002 \u5c0d\u65bc\u6211\u5011\u7684\u90e8\u843d\u683c\u7bc4\u4f8b\u4f86\u8aaa\uff0c\u9019\u4e0d\u662f\u5fc5\u9700\u7684\uff0c\u6240\u4ee5\u6211\u5011\u4e0d\u6703\u5be6\u505a\u5b83\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"jsx\" class=\"language-jsx\">export async function getServerSideProps(context) {\n  return {\n    props: {\n      \/\/ props for your component\n    },\n  };\n}<\/code><\/pre>\n\n\n\n<p>\u56e0\u70ba <code>getServerSideProps<\/code> \u662f\u5728\u8acb\u6c42\u6642\u547c\u53eb\u7684\uff0c\u6240\u4ee5\u5b83\u7684\u53c3\u6578\uff08\u4e0a\u4e0b\u6587\uff09\u5305\u542b\u4e86\u8acb\u6c42\u7279\u5b9a\u7684\u53c3\u6578\u3002<\/p>\n\n\n\n<p>\u50c5\u7576\u60a8\u7684\u9810\u5148\u6e32\u67d3\u5fc5\u9808\u5728\u8acb\u6c42\u6642\u7372\u53d6\u5176\u6578\u64da\u7684\u9801\u9762\u6642\uff0c\u624d\u61c9\u4f7f\u7528 <code>getServerSideProps<\/code>\u3002 Time to first byte \u7b2c\u4e00\u500b\u5b57\u5143\u7684\u6642\u9593 (TTFB) \u5c07\u6bd4 <code>getStaticProps<\/code> \u6162\uff0c\u56e0\u70ba\u670d\u52d9\u5668\u5fc5\u9808\u8a08\u7b97\u6bcf\u500b\u8acb\u6c42\u7684\u7d50\u679c\uff0c\u4e26\u4e14\u5982\u679c\u6c92\u6709\u984d\u5916\u7684\u914d\u7f6e\uff0cCDN \u7121\u6cd5\u7de9\u5b58\u7d50\u679c\u3002<\/p>\n\n\n\n<div style=\"height:24px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">\u5ba2\u6236\u7aef\u6e32\u67d3<\/h4>\n\n\n\n<p>\u5982\u679c\u4e0d\u9700\u8981\u9810\u5148\u6e32\u67d3\u6578\u64da\uff0c\u9084\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u7b56\u7565\uff08\u7a31\u70ba\u5ba2\u6236\u7aef\u6e32\u67d3\uff09\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u975c\u614b\u751f\u6210\uff08\u9810\u5148\u6e32\u67d3\uff09\u9801\u9762\u4e2d\u4e0d\u9700\u8981\u5916\u90e8\u8cc7\u6599\u7684\u90e8\u5206\u3002<\/li>\n\n\n\n<li>\u7576\u9801\u9762\u52a0\u8f09\u6642\uff0c\u4f7f\u7528 JavaScript \u5f9e\u5ba2\u6236\u7aef\u7372\u53d6\u5916\u90e8\u8cc7\u6599\u4e26\u586b\u5145\u5269\u9918\u90e8\u5206\u3002<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-qubely-image qubely-block-4a0389\"><div class=\"qubely-block-image  qubely-image-layout-simple\"><div class=\"qubely-image-media qubely-vertical-alignment-center qubely-horizontal-alignment-center\"><figure><div class=\"qubely-image-container\"><img decoding=\"async\" class=\"qubely-image-image\" src=\"https:\/\/fromideatocreation.com\/wp-content\/uploads\/2022\/07\/client-side-rendering-1.png\" alt=\"\"\/><\/div><\/figure><\/div><\/div><\/div>\n\n\n\n<p>\u4f8b\u5982\uff0c\u9019\u7a2e\u65b9\u6cd5\u9069\u7528\u65bc\u7528\u6236\u5100\u8868\u677f\u9801\u9762\u3002 \u56e0\u70ba\u5100\u8868\u677f\u662f\u79c1\u6709\u7684\u3001\u7279\u5b9a\u65bc\u7528\u6236\u7684\u9801\u9762\uff0c\u6240\u4ee5 SEO \u4e26\u4e0d\u6703\u592a\u91cd\u8981\uff0c\u4e26\u4e14\u8a72\u9801\u9762\u4e0d\u9700\u8981\u9810\u5148\u6e32\u67d3\u3002 \u6578\u64da\u7d93\u5e38\u66f4\u65b0\uff0c\u9019\u9700\u8981\u5728\u8acb\u6c42\u6642\u7372\u53d6\u6578\u64da\u3002<\/p>\n\n\n\n<div style=\"height:24px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">SWR<\/h4>\n\n\n\n<p>Next.js \u80cc\u5f8c\u7684\u5718\u968a\u5efa\u7acb\u4e86\u4e00\u500b\u540d\u70ba <a href=\"https:\/\/swr.vercel.app\/\" target=\"_blank\" rel=\"noreferrer noopener\" title=\"SWR\">SWR<\/a> \u7684\u7528\u65bc\u6578\u64da\u7372\u53d6\u7684 React hook\u3002 \u5982\u679c\u60a8\u5728\u5ba2\u6236\u7aef\u7372\u53d6\u6578\u64da\uff0c\u6211\u5011\u5f37\u70c8\u63a8\u85a6\u5b83\u3002 \u5b83\u8655\u7406\u7de9\u5b58\u3001\u91cd\u65b0\u9a57\u8b49\u3001\u7126\u9ede\u8ddf\u8e2a\u3001\u9593\u9694\u91cd\u65b0\u7372\u53d6\u7b49\u3002 \u6211\u5011\u4e0d\u6703\u5728\u9019\u88e1\u8a73\u7d30\u4ecb\u7d39\uff0c\u4f46\u9019\u88e1\u6709\u4e00\u500b\u793a\u7bc4\u7528\u6cd5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"jsx\" class=\"language-jsx\">import useSWR from 'swr';\n\nfunction Profile() {\n  const { data, error } = useSWR('\/api\/user', fetch);\n\n  if (error) return &lt;div&gt;failed to load&lt;\/div&gt;;\n  if (!data) return &lt;div&gt;loading...&lt;\/div&gt;;\n  return &lt;div&gt;hello {data.name}!&lt;\/div&gt;;\n}<\/code><\/pre>\n\n\n\n<p>\u67e5\u770b <a href=\"https:\/\/swr.vercel.app\/\" target=\"_blank\" rel=\"noreferrer noopener\" title=\"SWR \u6587\u4ef6\">SWR \u6587\u4ef6<\/a>\u4ee5\u4e86\u89e3\u66f4\u591a\u5167\u5bb9\u3002<\/p>\n\n\n\n<p>\u540c\u6a23\uff0c\u60a8\u53ef\u4ee5\u5728 <a href=\"https:\/\/nextjs.org\/docs\/basic-features\/data-fetching\" target=\"_blank\" rel=\"noreferrer noopener\" title=\"Data Fetching \u6587\u4ef6\">Data Fetching \u6587\u4ef6<\/a>\u4e2d\u7372\u5f97\u6709\u95dc <code><a href=\"https:\/\/nextjs.org\/docs\/basic-features\/data-fetching#getstaticprops-static-generation\" target=\"_blank\" rel=\"noreferrer noopener\" title=\"getStaticProps\">getStaticProps<\/a><\/code> \u548c <code><a href=\"https:\/\/nextjs.org\/docs\/basic-features\/data-fetching#getserversideprops-server-side-rendering\" target=\"_blank\" rel=\"noreferrer noopener\" title=\"getServerSideProps\">getServerSideProps<\/a><\/code> \u7684\u6df1\u5165\u5167\u5bb9\u3002<\/p>\n\n\n\n<div style=\"height:24px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>\u5728\u4e0b\u4e00\u7bc0\u4e2d\uff0c\u6211\u5011\u5c07\u4f7f\u7528\u52d5\u614b\u8def\u7531\u70ba\u6bcf\u7bc7\u6587\u7ae0\u5efa\u7acb\u9801\u9762\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9019\u662f\u60a8\u61c9\u8a72\u77e5\u9053\u7684\u6709\u95dc getStaticProps \u8207 getServerSideProps \u7684\u4e00\u4e9b\u57fa\u672c\u5167\u5bb9\u3002<\/p>\n","protected":false},"author":1,"featured_media":1165,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"qubely_global_settings":"","qubely_interactions":"","inline_featured_image":false,"_ti_tpc_template_sync":false,"_ti_tpc_template_id":"","footnotes":""},"categories":[164,106],"tags":[233,234,163,235],"class_list":["post-1586","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-next-js","category-106","tag-getserversideprops","tag-getstaticprops","tag-next-js","tag-swr"],"acf":[],"aioseo_notices":[],"qubely_featured_image_url":{"full":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download.png",720,454,false],"landscape":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download.png",720,454,false],"portraits":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-540x320.png",540,320,true],"thumbnail":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-150x150.png",150,150,true],"medium":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-300x189.png",300,189,true],"medium_large":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download.png",640,404,false],"large":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download.png",640,404,false],"1536x1536":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download.png",720,454,false],"2048x2048":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download.png",720,454,false],"qubely_landscape":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download.png",720,454,false],"qubely_portrait":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-540x320.png",540,320,true],"qubely_thumbnail":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-140x100.png",140,100,true],"nazare_single_thumb":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download.png",720,454,false],"nazare_post_card_thumb":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-480x454.png",480,454,true],"nazare_widget_thumb":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-100x100.png",100,100,true],"nazare_widget_first_thumb":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-350x206.png",350,206,true],"nazare_el_banner_left":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download.png",720,454,false],"nazare_el_banner_right":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-560x454.png",560,454,true],"nazare_el_post_400x376":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-400x376.png",400,376,true],"nazare_el_post_520x460":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-520x454.png",520,454,true],"nazare_el_post_500x335":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-500x335.png",500,335,true],"nazare_el_post_500x300":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-500x300.png",500,300,true],"nazare_el_post_655x640":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-655x454.png",655,454,true],"nazare_el_post_500x290":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-500x290.png",500,290,true],"nazare_el_post_416x278":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-416x278.png",416,278,true],"nazare_el_post_480x425":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-480x425.png",480,425,true],"nazare_el_post_635x640":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-635x454.png",635,454,true],"nazare_el_post_305x177":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-305x177.png",305,177,true],"nazare_el_post_400x400":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-400x400.png",400,400,true],"nazare_el_post_400x360":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-400x360.png",400,360,true],"nazare_el_post_416x416":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-416x416.png",416,416,true],"nazare_el_post_485x430":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-485x430.png",485,430,true],"nazare_el_post_700x467":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-700x454.png",700,454,true],"nazare_el_post_1000x581":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download.png",720,454,false],"nazare_post_1320x605":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download.png",720,454,false],"nazare_post_705x565":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-705x454.png",705,454,true],"nazare_post_400x265":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-400x265.png",400,265,true],"nazare_el_post_1248x630":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download.png",720,454,false],"woocommerce_thumbnail":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-300x300.png",300,300,true],"woocommerce_single":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-600x378.png",600,378,true],"woocommerce_gallery_thumbnail":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-100x100.png",100,100,true],"shop_catalog":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-300x300.png",300,300,true],"shop_single":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-600x378.png",600,378,true],"shop_thumbnail":["https:\/\/fromideatocreation.com\/wp-content\/uploads\/2023\/05\/app-download-100x100.png",100,100,true]},"qubely_author":{"display_name":"Wen","author_link":"https:\/\/fromideatocreation.com\/?author=1"},"qubely_comment":0,"qubely_category":"<a href=\"https:\/\/fromideatocreation.com\/?cat=164\" rel=\"category\">Next.js<\/a> <a href=\"https:\/\/fromideatocreation.com\/?cat=106\" rel=\"category\">\u6559\u5b78<\/a>","qubely_excerpt":"\u9019\u662f\u60a8\u61c9\u8a72\u77e5\u9053\u7684\u6709\u95dc getStaticProps \u8207 getServerSideProps \u7684\u4e00\u4e9b\u57fa\u672c\u5167\u5bb9\u3002","_links":{"self":[{"href":"https:\/\/fromideatocreation.com\/index.php?rest_route=\/wp\/v2\/posts\/1586","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fromideatocreation.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fromideatocreation.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fromideatocreation.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fromideatocreation.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1586"}],"version-history":[{"count":1,"href":"https:\/\/fromideatocreation.com\/index.php?rest_route=\/wp\/v2\/posts\/1586\/revisions"}],"predecessor-version":[{"id":1613,"href":"https:\/\/fromideatocreation.com\/index.php?rest_route=\/wp\/v2\/posts\/1586\/revisions\/1613"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fromideatocreation.com\/index.php?rest_route=\/wp\/v2\/media\/1165"}],"wp:attachment":[{"href":"https:\/\/fromideatocreation.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1586"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fromideatocreation.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1586"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fromideatocreation.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1586"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}