{"id":315,"date":"2025-08-04T21:58:00","date_gmt":"2025-08-04T13:58:00","guid":{"rendered":"https:\/\/mitongxue.cn\/?p=315"},"modified":"2026-06-10T22:23:03","modified_gmt":"2026-06-10T14:23:03","slug":"hooks","status":"publish","type":"post","link":"https:\/\/mitongxue.cn\/index.php\/2025\/08\/04\/hooks\/","title":{"rendered":"Hooks"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><em>Hooks<\/em> \u57fa\u672c\u4ecb\u7ecd<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><em>Hook<\/em> \u662f <em>React 16.8<\/em> \u7684\u65b0\u589e\u7279\u6027\u3002\u5b83\u53ef\u4ee5\u8ba9\u4f60\u5728\u4e0d\u7f16\u5199 <em>class<\/em> \u7684\u60c5\u51b5\u4e0b\u4f7f\u7528 <em>state<\/em> \u4ee5\u53ca\u5176\u4ed6\u7684 <em>React<\/em> \u7279\u6027\u3002<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Hooks<\/em> \u7684\u51fa\u73b0\uff0c\u9996\u5148\u80fd\u89e3\u51b3\u5982\u4e0b\u7684\u4e00\u4e9b\u95ee\u9898\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u544a\u522b\u4ee4\u4eba\u7591\u60d1\u7684\u751f\u547d\u5468\u671f\n<ul class=\"wp-block-list\">\n<li>\u4f8b\u5982\u4e0b\u9762\u7684\u4f8b\u5b50\uff0c\u76f8\u540c\u7684\u4ee3\u7801\u5728\u4e0d\u540c\u7684\u751f\u547d\u5468\u671f\u4e2d\u5b58\u5728\u4e86\u4e24\u4efd<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>import React from \"react\";<br>\u200b<br>\/\/ \u7c7b\u7ec4\u4ef6<br>class App extends React.Component {<br>\u200b<br> &nbsp;constructor() {<br> &nbsp; &nbsp;super();<br> &nbsp; &nbsp;this.state = {<br> &nbsp; &nbsp; &nbsp;count : 0<br> &nbsp;  }<br>  }<br>\u200b<br> &nbsp;componentDidMount(){<br> &nbsp; &nbsp;document.title = `\u4f60\u70b9\u51fb\u4e86${this.state.count}\u6b21`;<br>  }<br>\u200b<br> &nbsp;componentDidUpdate(){<br> &nbsp; &nbsp;document.title = `\u4f60\u70b9\u51fb\u4e86${this.state.count}\u6b21`;<br>  }<br>\u200b<br> &nbsp;render() {<br> &nbsp; &nbsp;return (<br> &nbsp; &nbsp; &nbsp;&lt;div&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp;&lt;p&gt;You clicked {this.state.count} times&lt;\/p&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp;&lt;button onClick={() =&gt; this.setState({ count: this.state.count + 1 })}&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp;  Click me<br> &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/button&gt;<br> &nbsp; &nbsp; &nbsp;&lt;\/div&gt;<br> &nbsp;  )<br>  }<br>}<br>\u200b<br>export default App;<br>\u200b<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u544a\u522b\u7c7b\u7ec4\u4ef6\u4e2d\u70e6\u4eba\u7684 <em>this<\/em>\n<ul class=\"wp-block-list\">\n<li>\u5728\u7c7b\u7ec4\u4ef6\u4e2d\uff0c\u4f1a\u5b58\u5728 <em>this<\/em> \u7684\u6307\u5411\u95ee\u9898\uff0c\u4f8b\u5982\u5728\u4e8b\u4ef6\u5904\u7406\u51fd\u6570\u4e2d\uff0c\u4e0d\u80fd\u76f4\u63a5\u901a\u8fc7 <em>this<\/em> \u83b7\u53d6\u7ec4\u4ef6\u5b9e\u4f8b\uff0c\u9700\u8981\u4fee\u6539 <em>this<\/em> \u6307\u5411<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\u544a\u522b\u7e41\u91cd\u7684\u7c7b\u7ec4\u4ef6\uff0c\u56de\u5f52\u524d\u7aef\u7a0b\u5e8f\u5458\u66f4\u52a0\u719f\u6089\u7684\u51fd\u6570<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u53e6\u5916\uff0c<em>Hooks<\/em> \u7684\u51fa\u73b0\uff0c\u8fd8\u6709\u66f4\u52a0\u91cd\u8981\u7684\u4e00\u4e2a\u4fe1\u53f7\uff0c\u90a3\u5c31\u662f\u6574\u4e2a <em>React<\/em> \u601d\u60f3\u4e0a\u9762\u7684\u8f6c\u53d8\uff0c\u4ece\u201c\u9762\u5411\u5bf9\u8c61\u201d\u7684\u601d\u60f3\u5f00\u59cb\u8f6c\u4e3a\u201c\u51fd\u6570\u5f0f\u7f16\u7a0b\u201d\u7684\u601d\u60f3\u3002\u8fd9\u662f\u7f16\u7a0b\u8303\u5f0f\u4e0a\u9762\u7684\u8f6c\u53d8\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Hook<\/em> \u5c31\u662f <em>JavaScript<\/em> \u51fd\u6570\uff0c\u4f46\u662f\u4f7f\u7528\u5b83\u4eec\u4f1a\u6709\u4e24\u4e2a\u989d\u5916\u7684\u89c4\u5219\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u53ea\u80fd\u5728<strong>\u51fd\u6570\u6700\u5916\u5c42<\/strong>\u8c03\u7528 <em>Hook<\/em>\u3002\u4e0d\u8981\u5728\u5faa\u73af\u3001\u6761\u4ef6\u5224\u65ad\u6216\u8005\u5b50\u51fd\u6570\u4e2d\u8c03\u7528\u3002<\/li>\n\n\n\n<li>\u53ea\u80fd\u5728 <strong><em>React<\/em> \u7684\u51fd\u6570\u7ec4\u4ef6<\/strong>\u4e2d\u8c03\u7528 <em>Hook<\/em>\u3002\u4e0d\u8981\u5728\u5176\u4ed6 <em>JavaScript<\/em> \u51fd\u6570\u4e2d\u8c03\u7528\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><em>useState<\/em> \u548c <em>useEffect<\/em><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><em>useState<\/em> \u5305\u542b\u4ee5\u4e0b\u7684\u77e5\u8bc6\u70b9\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u57fa\u672c\u4f7f\u7528<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>import { useState } from 'react';<br>\u200b<br>function App(props) {<br>\u200b<br> &nbsp;let &#91;count, setCount] = useState(0);<br>\u200b<br> &nbsp;function clickhandle(){<br> &nbsp; &nbsp;setCount(++count);<br>  }<br>\u200b<br> &nbsp;return (<br> &nbsp; &nbsp;&lt;div&gt;<br> &nbsp; &nbsp; &nbsp;&lt;div&gt;{count}&lt;\/div&gt;<br> &nbsp; &nbsp; &nbsp;&lt;button onClick={clickhandle}&gt;+1&lt;\/button&gt;<br> &nbsp; &nbsp;&lt;\/div&gt;<br>  );<br>}<br>\u200b<br>export default App;<br>\u200b<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u58f0\u660e\u591a\u4e2a <em>state<\/em> \u72b6\u6001<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>import { useState } from 'react';<br>\u200b<br>function App(props) {<br>\u200b<br> &nbsp;let &#91;age, setAge] = useState(18);<br> &nbsp;const &#91;fruit, setFruit] = useState('banana');<br> &nbsp;const &#91;todos, setTodos] = useState(&#91;{ text: '\u5b66\u4e60 Hook' }]);<br>\u200b<br> &nbsp;function clickhandle(){<br> &nbsp; &nbsp;setAge(++age);<br>  }<br>\u200b<br>\u200b<br> &nbsp;return (<br> &nbsp; &nbsp;&lt;div&gt;<br> &nbsp; &nbsp; &nbsp;&lt;div&gt;\u5e74\u9f84\uff1a{age}&lt;\/div&gt;<br> &nbsp; &nbsp; &nbsp;&lt;div&gt;\u6c34\u679c\uff1a{fruit}&lt;\/div&gt;<br> &nbsp; &nbsp; &nbsp;&lt;div&gt;\u5f85\u529e\u4e8b\u9879\uff1a{todos&#91;0].text}&lt;\/div&gt;<br> &nbsp; &nbsp; &nbsp;&lt;button onClick={clickhandle}&gt;+1&lt;\/button&gt;<br> &nbsp; &nbsp;&lt;\/div&gt;<br>  );<br>}<br>\u200b<br>export default App;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><em>useEffect<\/em> \u5305\u542b\u4ee5\u4e0b\u77e5\u8bc6\u70b9\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u526f\u4f5c\u7528\u7684\u6982\u5ff5<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u7eaf\u51fd\u6570\uff1a\u4e00\u4e2a\u786e\u5207\u7684\u53c2\u6570\u5728\u4f60\u7684\u51fd\u6570\u4e2d\u8fd0\u884c\u540e\uff0c\u4e00\u5b9a\u80fd\u5f97\u5230\u4e00\u4e2a\u786e\u5207\u7684\u503c<\/li>\n\n\n\n<li>\u5982\u679c\u4e00\u4e2a\u51fd\u6570\u4e2d\uff0c\u5b58\u5728\u526f\u4f5c\u7528\uff0c\u90a3\u4e48\u6211\u4eec\u5c31\u79f0\u8be5\u51fd\u6570\u4e0d\u662f\u4e00\u4e2a\u7eaf\u51fd\u6570\uff0c\u6240\u8c13\u526f\u4f5c\u7528\uff0c\u5c31\u662f\u6307\u51fd\u6570\u7684\u7ed3\u679c\u662f\u4e0d\u53ef\u63a7\uff0c\u4e0d\u53ef\u9884\u671f\u3002<\/li>\n\n\n\n<li>\u5e38\u89c1\u7684\u526f\u4f5c\u7528\u6709\u53d1\u9001\u7f51\u7edc\u8bf7\u6c42\u3001\u6dfb\u52a0\u4e00\u4e9b\u76d1\u542c\u7684\u6ce8\u518c\u548c\u53d6\u6d88\u6ce8\u518c\uff0c\u624b\u52a8\u4fee\u6539 <em>DOM<\/em>\uff0c\u4ee5\u524d\u6211\u4eec\u662f\u5c06\u8fd9\u4e9b\u526f\u4f5c\u7528\u5199\u5728\u751f\u547d\u5468\u671f\u94a9\u5b50\u51fd\u6570\u91cc\u9762\uff0c\u73b0\u5728\u5c31\u53ef\u4ee5\u4e66\u5199\u5728 <em>useEffect<\/em> \u8fd9\u4e2a <em>Hook<\/em> \u91cc\u9762<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u57fa\u672c\u4f7f\u7528<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>import { useState, useEffect } from 'react';<br>\u200b<br>function App() {<br>\u200b<br> &nbsp;let &#91;count, setCount] = useState(0);<br>\u200b<br> &nbsp;useEffect(()=&gt;{<br> &nbsp; &nbsp;\/\/ \u4e66\u5199\u4f60\u8981\u6267\u884c\u7684\u526f\u4f5c\u7528\uff0c\u4f1a\u5728\u7ec4\u4ef6\u6e32\u67d3\u5b8c\u6210\u540e\u6267\u884c<br> &nbsp; &nbsp;document.title = `\u4f60\u70b9\u51fb\u4e86${count}\u6b21`;<br>  });<br>\u200b<br>\u200b<br> &nbsp;function clickhandle() {<br> &nbsp; &nbsp;setCount(++count);<br>  }<br>\u200b<br> &nbsp;return (<br> &nbsp; &nbsp;&lt;div&gt;<br> &nbsp; &nbsp; &nbsp;&lt;div&gt;\u4f60\u70b9\u51fb\u4e86{count}\u6b21&lt;\/div&gt;<br> &nbsp; &nbsp; &nbsp;&lt;button onClick={clickhandle}&gt;+1&lt;\/button&gt;<br> &nbsp; &nbsp;&lt;\/div&gt;<br>  );<br>}<br>\u200b<br>export default App;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6267\u884c\u6e05\u7406\u5de5\u4f5c<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>import { useState, useEffect } from 'react';<br>\u200b<br>function App() {<br>\u200b<br> &nbsp;let &#91;count, setCount] = useState(0);<br>\u200b<br> &nbsp;useEffect(()=&gt;{<br> &nbsp; &nbsp;\/\/ \u4e66\u5199\u4f60\u8981\u6267\u884c\u7684\u526f\u4f5c\u7528\uff0c\u4f1a\u5728\u7ec4\u4ef6\u6e32\u67d3\u5b8c\u6210\u540e\u6267\u884c<br> &nbsp; &nbsp;const stopTimer = setInterval(()=&gt;{<br> &nbsp; &nbsp; &nbsp;console.log(\"Hello\");<br> &nbsp;  },1000) &nbsp; <br>\u200b<br> &nbsp; &nbsp;\/\/ console.log(\"\u526f\u4f5c\u7528\u51fd\u6570\u6267\u884c\u4e86\");<br> &nbsp; &nbsp;\/\/ \u5728 useEffect \u4e2d\uff0c\u53ef\u4ee5\u8fd4\u56de\u4e00\u4e2a\u51fd\u6570\uff0c\u8be5\u51fd\u6570\u6211\u4eec\u79f0\u4e4b\u4e3a\u6e05\u7406\u51fd\u6570\uff08\u4e00\u822c\u5c31\u662f\u505a\u4e00\u4e9b\u6e05\u7406\u64cd\u4f5c\uff09<br> &nbsp; &nbsp;\/\/ \u8be5\u51fd\u6570\u4f1a\u5728\u4e0b\u4e00\u6b21\u6e32\u67d3\u4e4b\u540e\uff0c\u4f46\u662f\u5728\u6267\u884c\u526f\u4f5c\u7528\u64cd\u4f5c\u4e4b\u524d\u6267\u884c<br> &nbsp; &nbsp;return ()=&gt;{<br> &nbsp; &nbsp; &nbsp;\/\/ console.log(\"\u6e05\u7406\u51fd\u6570\u6267\u884c\u4e86\");<br> &nbsp; &nbsp; &nbsp;clearInterval(stopTimer);<br> &nbsp;  }<br>  });<br>\u200b<br>\u200b<br> &nbsp;function clickhandle() {<br> &nbsp; &nbsp;setCount(++count);<br>  }<br>\u200b<br> &nbsp;return (<br> &nbsp; &nbsp;&lt;div&gt;<br> &nbsp; &nbsp; &nbsp;&lt;div&gt;\u4f60\u70b9\u51fb\u4e86{count}\u6b21&lt;\/div&gt;<br> &nbsp; &nbsp; &nbsp;&lt;button onClick={clickhandle}&gt;+1&lt;\/button&gt;<br> &nbsp; &nbsp;&lt;\/div&gt;<br>  );<br>}<br>\u200b<br>export default App;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u526f\u4f5c\u7528\u7684\u4f9d\u8d56<ul><li>\u76ee\u524d\uff0c\u6211\u4eec\u7684\u526f\u4f5c\u7528\u51fd\u6570\uff0c\u6bcf\u6b21\u91cd\u65b0\u6e32\u67d3\u540e\uff0c\u90fd\u4f1a\u91cd\u65b0\u6267\u884c\uff0c\u6709\u4e9b\u65f6\u5019\u6211\u4eec\u662f\u9700\u8981\u8bbe\u7f6e\u4f9d\u8d56\u9879\uff0c\u4f20\u9012\u7b2c\u4e8c\u4e2a\u53c2\u6570\uff0c\u7b2c\u4e8c\u4e2a\u53c2\u6570\u4e3a\u4e00\u4e2a\u4f9d\u8d56\u6570\u7ec4<\/li><\/ul><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>import { useState, useEffect } from 'react';\n\nfunction App() {\n\n  let &#91;count1, setCount1] = useState(0);\n  let &#91;count2, setCount2] = useState(0);\n  let &#91;count3, setCount3] = useState(0);\n\n  useEffect(()=>{\n    console.log(\"\u6267\u884c\u526f\u4f5c\u7528\u51fd\u6570\");\n  },&#91;count1]);\n\n  return (\n    &lt;div>\n      &lt;div>count1:{count1}&lt;\/div>\n      &lt;div>count2:{count2}&lt;\/div>\n      &lt;div>count3:{count3}&lt;\/div>\n      &lt;button onClick={()=>setCount1(++count1)}>+1&lt;\/button>\n      &lt;button onClick={()=>setCount2(++count2)}>+1&lt;\/button>\n      &lt;button onClick={()=>setCount3(++count3)}>+1&lt;\/button>\n    &lt;\/div>\n  );\n}\n\nexport default App;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u60f3\u8981\u526f\u4f5c\u7528\u53ea\u6267\u884c\u4e00\u6b21\uff0c\u4f20\u9012\u7b2c\u4e8c\u4e2a\u53c2\u6570\u4e3a\u4e00\u4e2a\u7a7a\u6570\u7ec4<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>useEffect(()=>{\n  console.log(\"\u6267\u884c\u526f\u4f5c\u7528\u51fd\u6570\");\n},&#91;]);<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u81ea\u5b9a\u4e49 <em>Hook<\/em><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u9664\u4e86\u4f7f\u7528\u5b98\u65b9\u5185\u7f6e\u7684 <em>Hook<\/em>\uff0c\u6211\u4eec\u8fd8\u53ef\u4ee5\u81ea\u5b9a\u4e49 <em>Hook<\/em>\uff0c\u81ea\u5b9a\u4e49 <em>Hook<\/em> \u7684\u672c\u8d28\u5176\u5b9e\u5c31\u662f\u51fd\u6570\uff0c\u4f46\u662f\u548c\u666e\u901a\u51fd\u6570\u8fd8\u662f\u6709\u4e00\u4e9b\u533a\u522b\uff0c\u4e3b\u8981\u4f53\u73b0\u5728\u4ee5\u4e0b\u4e24\u4e2a\u70b9\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u81ea\u5b9a\u4e49 <em>Hook<\/em> \u80fd\u591f\u8c03\u7528\u8bf8\u5982 <em>useState<\/em>\u3001<em>useRef<\/em> \u7b49\uff0c\u666e\u901a\u51fd\u6570\u5219\u4e0d\u80fd\u3002\u7531\u6b64\u53ef\u4ee5\u901a\u8fc7\u5185\u7f6e\u7684 <em>Hooks<\/em> \u83b7\u5f97 <em>Fiber<\/em> \u7684\u8bbf\u95ee\u65b9\u5f0f\uff0c\u53ef\u4ee5\u5b9e\u73b0\u5728\u7ec4\u4ef6\u7ea7\u522b\u5b58\u50a8\u6570\u636e\u7684\u65b9\u6848\u7b49\u3002<\/li>\n\n\n\n<li>\u81ea\u5b9a\u4e49 <em>Hooks<\/em> \u9700\u8981\u4ee5 <em>use<\/em> \u5f00\u5934\uff0c\u666e\u901a\u51fd\u6570\u5219\u6ca1\u6709\u8fd9\u4e2a\u9650\u5236\u3002\u4f7f\u7528 <em>use<\/em> \u5f00\u5934\u5e76\u4e0d\u662f\u4e00\u4e2a\u8bed\u6cd5\u6216\u8005\u4e00\u4e2a\u5f3a\u5236\u6027\u7684\u65b9\u6848\uff0c\u66f4\u50cf\u662f\u4e00\u4e2a\u7ea6\u5b9a\u3002<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>import { useState } from 'react';\nimport useMyBook from \".\/useMyBook\"\n\nfunction App() {\n\n  const {bookName, setBookName} = useMyBook();\n  const &#91;value, setValue] = useState(\"\");\n\n\n  function changeHandle(e){\n    setValue(e.target.value);\n  }\n\n  function clickHandle(){\n    setBookName(value);\n  }\n\n  return (\n    &lt;div>\n      &lt;div>{bookName}&lt;\/div>\n      &lt;input type=\"text\" value={value} onChange={changeHandle}\/>\n      &lt;button onClick={clickHandle}>\u786e\u5b9a&lt;\/button>\n    &lt;\/div>\n  )\n  \n}\n\nexport default App;<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>import { useState } from \"react\";\n\nfunction useMyBook(){\n    const &#91;bookName, setBookName] = useState(\"React \u5b66\u4e60\");\n    return {\n        bookName, setBookName\n    }\n}\n\nexport default useMyBook;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hooks \u57fa\u672c\u4ecb\u7ecd Hook \u662f React 1..<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,11],"tags":[],"class_list":["post-315","post","type-post","status-publish","format-standard","hentry","category-react-","category-front"],"featured_image_urls":{"full":"","thumbnail":"","medium":"","medium_large":"","large":"","1536x1536":"","2048x2048":""},"author_info":{"info":["\u9648 \u67d0\u4eba"]},"category_info":"<a href=\"https:\/\/mitongxue.cn\/index.php\/category\/front\/react-%e5%89%8d%e7%ab%af\/\" rel=\"category tag\">React<\/a> <a href=\"https:\/\/mitongxue.cn\/index.php\/category\/front\/\" rel=\"category tag\">\u524d\u7aef<\/a>","tag_info":"\u524d\u7aef","comment_count":"0","_links":{"self":[{"href":"https:\/\/mitongxue.cn\/index.php\/wp-json\/wp\/v2\/posts\/315","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mitongxue.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mitongxue.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mitongxue.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mitongxue.cn\/index.php\/wp-json\/wp\/v2\/comments?post=315"}],"version-history":[{"count":2,"href":"https:\/\/mitongxue.cn\/index.php\/wp-json\/wp\/v2\/posts\/315\/revisions"}],"predecessor-version":[{"id":317,"href":"https:\/\/mitongxue.cn\/index.php\/wp-json\/wp\/v2\/posts\/315\/revisions\/317"}],"wp:attachment":[{"href":"https:\/\/mitongxue.cn\/index.php\/wp-json\/wp\/v2\/media?parent=315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mitongxue.cn\/index.php\/wp-json\/wp\/v2\/categories?post=315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mitongxue.cn\/index.php\/wp-json\/wp\/v2\/tags?post=315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}