{"id":207,"date":"2021-02-10T10:19:19","date_gmt":"2021-02-10T02:19:19","guid":{"rendered":"http:\/\/gjweb.top\/?p=207"},"modified":"2021-02-10T10:19:20","modified_gmt":"2021-02-10T02:19:20","slug":"hooks%e7%bb%84%e4%bb%b6%e8%af%a6%e8%a7%a3%ef%bc%88%e4%b8%8a%ef%bc%89","status":"publish","type":"post","link":"https:\/\/gjweb.top\/?p=207","title":{"rendered":"hooks\u7ec4\u4ef6\u8be6\u89e3\uff08\u4e0a\uff09"},"content":{"rendered":"\n<ol class=\"wp-block-list\"><li>useState\u7528\u6cd5<\/li><li>useREducer\u7528\u6cd5<\/li><li>useContent\u7528\u6cd5<\/li><li>useEffect &amp; useLayoutEffect\u7684\u533a\u522b\u7528\u6cd5<\/li><li>useMemo &amp;&amp; React.memo &amp;&amp; useCallback\u7528\u6cd5<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">1.useState\u7528\u6cd5<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>useState\u4f7f\u7528\u72b6\u6001<\/li><li>\u6ce8\u610f\u4e8b\u9879<ul><li>\u4e0d\u53ef\u4ee5\u5c40\u90e8\u66f4\u65b0<ul><li>\u5982\u679cstate\u662f\u4e00\u4e2a\u5bf9\u8c61\uff0csetState\u4e0d\u4f1a\u81ea\u52a8\u5408\u5e76\u5c5e\u6027<\/li><\/ul><\/li><li>\u5982\u679csetState\uff08obj\uff09\u5982\u679c\u5730\u5740\u4e0d\u53d8\uff0creact\u5c31\u4f1a\u8ba4\u4e3a\u6570\u636e\u6ca1\u53d8<\/li><li>useState\u53ef\u4ee5\u63a5\u6536\u51fd\u6570<\/li><\/ul><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\"> &nbsp; &nbsp;const [state,setState] = useState(()=&gt;{<br> &nbsp; &nbsp; &nbsp; &nbsp;return {}<br> &nbsp;  })<\/pre>\n\n\n\n<p>\u6848\u4f8b<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> &nbsp; &nbsp;function App() {<br> &nbsp; &nbsp; &nbsp; &nbsp;const [user,setUser] = useState({name:'\u5c0f\u660e', age: 18})<br> &nbsp; &nbsp; &nbsp; &nbsp;const onClick = ()=&gt;{<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;setUser({<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;...user,<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;name: '\u5c0f\u7ea2'<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  })<br> &nbsp; &nbsp; &nbsp;  }<br> &nbsp; &nbsp; &nbsp; &nbsp;return (<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;div className=\"App\"&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;h1&gt;{user.name}&lt;\/h1&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;h2&gt;{user.age}&lt;\/h2&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;button onClick={onClick}&gt;Click&lt;\/button&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/div&gt;<br> &nbsp; &nbsp; &nbsp;  );<br> &nbsp;  }<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">2. useREducer\u7528\u6cd5<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>\u53ef\u4ee5\u7406\u89e3\u6210useState\u7684\u590d\u6742\u7248<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\"> &nbsp; &nbsp;const initial = {<br> &nbsp; &nbsp; &nbsp; &nbsp;n: 0<br> &nbsp;  };<br>\u200b<br> &nbsp; &nbsp;const reducer = (state, action) =&gt; {<br> &nbsp; &nbsp; &nbsp; &nbsp;if (action.type === \"add\") {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return { n: state.n + action.number };<br> &nbsp; &nbsp; &nbsp;  } else if (action.type === \"multi\") {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return { n: state.n * 2 };<br> &nbsp; &nbsp; &nbsp;  } else {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;throw new Error(\"unknown type\");<br> &nbsp; &nbsp; &nbsp;  }<br> &nbsp;  };<br>\u200b<br> &nbsp; &nbsp;function App() {<br> &nbsp; &nbsp; &nbsp; &nbsp;const [state, dispatch] = useReducer(reducer, initial);<br> &nbsp; &nbsp; &nbsp; &nbsp;const { n } = state;<br> &nbsp; &nbsp; &nbsp; &nbsp;const onClick = () =&gt; {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dispatch({ type: \"add\", number: 1 });<br> &nbsp; &nbsp; &nbsp;  };<br> &nbsp; &nbsp; &nbsp; &nbsp;const onClick2 = () =&gt; {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dispatch({ type: \"add\", number: 2 });<br> &nbsp; &nbsp; &nbsp;  };<br> &nbsp; &nbsp; &nbsp; &nbsp;return (<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;div className=\"App\"&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;h1&gt;n: {n}&lt;\/h1&gt;<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;button onClick={onClick}&gt;+1&lt;\/button&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;button onClick={onClick2}&gt;+2&lt;\/button&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/div&gt;<br> &nbsp; &nbsp; &nbsp;  );<br> &nbsp;  }<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">3. useContent\u7528\u6cd5<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>useContent\u5168\u5c40\u53d8\u91cf\u662f\u5168\u5c40\u7684\u4e0a\u4e0b\u6587<\/li><li>\u6ce8\u610f<ul><li>\u4e0d\u662f\u54cd\u5e94\u5f0f\u7684<ul><li>\u5728\u4e00\u4e2a\u6a21\u5757\u5c06C\u91cc\u9762\u7684\u503c\u6539\u53d8\u540e\uff0c\u53e6\u4e00\u4e2a\u6a21\u5757\u4e0d\u4f1a\u611f\u77e5\u8fd9\u4e2a\u53d8\u5316<\/li><\/ul><\/li><\/ul><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\"> &nbsp; &nbsp;const C = createContext(null);<br>\u200b<br> &nbsp; &nbsp;function App() {<br> &nbsp; &nbsp; &nbsp; &nbsp;console.log(\"App \u6267\u884c\u4e86\");<br> &nbsp; &nbsp; &nbsp; &nbsp;const [n, setN] = useState(0);<br> &nbsp; &nbsp; &nbsp; &nbsp;return (<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;C.Provider value={{ n, setN }}&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;div className=\"App\"&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;Baba \/&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/div&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/C.Provider&gt;<br> &nbsp; &nbsp; &nbsp;  );<br> &nbsp;  }<br>\u200b<br> &nbsp; &nbsp;function Baba() {<br> &nbsp; &nbsp; &nbsp; &nbsp;const { n, setN } = useContext(C);<br> &nbsp; &nbsp; &nbsp; &nbsp;return (<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;div&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\u6211\u662f\u7238\u7238 n: {n} &lt;Child \/&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/div&gt;<br> &nbsp; &nbsp; &nbsp;  );<br> &nbsp;  }<br>\u200b<br> &nbsp; &nbsp;function Child() {<br> &nbsp; &nbsp; &nbsp; &nbsp;const { n, setN } = useContext(C);<br> &nbsp; &nbsp; &nbsp; &nbsp;const onClick = () =&gt; {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;setN(i =&gt; i + 1);<br> &nbsp; &nbsp; &nbsp;  };<br> &nbsp; &nbsp; &nbsp; &nbsp;return (<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;div&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\u6211\u662f\u513f\u5b50 \u6211\u5f97\u5230\u7684 n: {n}<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;button onClick={onClick}&gt;+1&lt;\/button&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/div&gt;<br> &nbsp; &nbsp; &nbsp;  );<br> &nbsp;  }<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">4. useEffect &amp; useLayoutEffect\u7684\u533a\u522b\u7528\u6cd5<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>useEffect \u526f\u4f5c\u7528<ul><li>\u5bf9\u73af\u5883\u7684\u6539\u53d8\u5c31\u662f\u526f\u4f5c\u7528,\u5982\u4fee\u6539\u4e86document.title<\/li><\/ul><\/li><li>\u7528\u9014<ul><li>\u5728\u51fd\u6570\u7ec4\u4ef6\u4e2d\u6a21\u62dfcomponentDidMount\\componentDidUpdate\\componentWillUnmount<\/li><li>\u4ee5\u4e0a\u4e09\u79cd\u7528\u9014\u53ef\u4ee5\u540c\u65f6\u5b58\u5728<\/li><\/ul><\/li><li>\u5f53\u591a\u4e2auseEffect\u51fa\u73b0\u65f6,\u4f1a\u6309\u7167\u51fa\u73b0\u7684\u6b21\u5e8f\u6267\u884c<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\"> &nbsp; &nbsp;function App(){<br> &nbsp; &nbsp; &nbsp; &nbsp;const [n,setN] = useState(0)<br> &nbsp; &nbsp; &nbsp; &nbsp;const add = ()=&gt;{<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;setN((state)=&gt;{return state+1})<br> &nbsp; &nbsp; &nbsp;  }<br> &nbsp; &nbsp; &nbsp; &nbsp;useEffect(()=&gt;{<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;console.log(\"\u7b2c\u4e00\u6b21\u6e32\u67d3\u6267\u884c\")<br> &nbsp; &nbsp; &nbsp;  },[])<br> &nbsp; &nbsp; &nbsp; &nbsp;useEffect(()=&gt;{<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;console.log(\"n\u53d1\u751f\u53d8\u5316\u662f\u6267\u884c\")<br> &nbsp; &nbsp; &nbsp;  },[n])<br> &nbsp; &nbsp; &nbsp; &nbsp;useEffect(()=&gt;{<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return ()=&gt;{<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;console.log(\"\u9875\u9762\u9500\u6bc1\u65f6\u6267\u884c\")<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }<br> &nbsp; &nbsp; &nbsp;  },[])<br> &nbsp; &nbsp; &nbsp; &nbsp;return(<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;div&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {n}<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;button onClick={add}&gt;add&lt;\/button&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/div&gt;<br> &nbsp; &nbsp; &nbsp;  )<br> &nbsp;  }<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">useLayoutEffect<\/h3>\n\n\n\n<p>\u7528\u6cd5\u548cuseEffect\u5b8c\u5168\u76f8\u540c \u6848\u4f8b\u4e00<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> &nbsp; &nbsp;const App = () =&gt; {<br> &nbsp; &nbsp; &nbsp; &nbsp;const [value, setValue] = useState(0);<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp;useEffect(() =&gt; {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;document.querySelector(\"#x\").innerText = `value: 1000`;<br> &nbsp; &nbsp; &nbsp;  }, [value]);<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp;return (<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;div id=\"x\" onClick={() =&gt; setValue(0)}&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;value: {value}<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/div&gt;<br> &nbsp; &nbsp; &nbsp;  );<br> &nbsp;  };<\/pre>\n\n\n\n<p>\u4e0a\u9762\u7684\u4ee3\u7801\u4f1a\u5728\u4f1a\u6d4f\u89c8\u5668\u5f00\u59cb\u663e\u793avalue:0,\u7136\u540e\u5728\u663e\u793avalue:100;(\u5982\u679c\u60f3\u8ba9\u6d4f\u89c8\u5668\u76f4\u63a5\u663e\u793avalue:100)<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> &nbsp; &nbsp;useLayoutEffect(() =&gt; {<br> &nbsp; &nbsp; &nbsp; &nbsp;document.querySelector(\"#x\").innerText = `value: 1000`;<br> &nbsp;  }, [value]);<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">useEffect\u548cuseLayoutEffect\u7684\u533a\u522b<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>useEffect\u5728render\u4e4b\u540e\u6267\u884c,\u6240\u4ee5\u9875\u9762\u4f1a\u5148\u663e\u793avalue:0\u7136\u540e\u5728\u66f4\u65b0\u4e3avalue:1000<\/li><li>useLayoutEffects\u5728render\u4e4b\u524d\u6267\u884c,\u5728\u9875\u9762\u6e32\u67d3\u4e4b\u524dvalue\u5df2\u7ecf\u88ab\u66f4\u6539\u4e3a1000; \u56fa\u4e24\u8005\u8fd9\u7684\u533a\u522b\u5c31\u662f\u6267\u884c\u65f6\u673a\u7684\u533a\u522b,\u5728\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u63a8\u8350\u4f7f\u7528useEffect<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">5. useMemo &amp;&amp; React.memo &amp;&amp; useCallback\u7528\u6cd5<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>useMemo\u4e3a\u4e86\u89e3\u51b3React\u7684\u591a\u4f59\u6e32\u67d3<ul><li>\u573a\u666f \u5f53App\u7ec4\u4ef6\u5f15\u7528\u5b50\u7ec4\u4ef6\u65f6,\u5f53App\u7ec4\u4ef6\u66f4\u65b0\u65f6\u4f1a\u91cd\u65b0\u8c03\u7528App()\u91cd\u65b0\u5e76\u91cd\u65b0\u6e32\u67d3\u5b50\u7ec4\u4ef6,\u8fd9\u5c31\u5bfc\u81f4\u4e86\u5b50\u7ec4\u4ef6\u5728\u6ca1\u6709\u4efb\u4f55\u6539\u53d8\u5c31\u88ab\u91cd\u65b0\u6e32\u67d3\u4e86.<\/li><\/ul><\/li><li>useMemo \u642d\u914dReact.memo\u4f7f\u7528<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\"> &nbsp; &nbsp;function App(){<br> &nbsp; &nbsp;console.log(\"\u8c03\u7528\u4e86app\")<br> &nbsp; &nbsp;const [n,setN] = useState(0)<br> &nbsp; &nbsp;const [m,setM] = useState(0)<br> &nbsp; &nbsp;const addN = ()=&gt;{<br> &nbsp; &nbsp; &nbsp; &nbsp;setN((state)=&gt;{<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return state+1<br> &nbsp; &nbsp; &nbsp;  })<br> &nbsp;  }<br> &nbsp; &nbsp;const addM = useMemo(()=&gt;{<br> &nbsp; &nbsp; &nbsp; &nbsp;return ()=&gt;{<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;setM((state)=&gt;{<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return state+1<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  })<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }<br> &nbsp;  },[m])<br> &nbsp; &nbsp;return (<br> &nbsp; &nbsp; &nbsp; &nbsp;&lt;div&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;div&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;prend:{n}<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;button onClick={addN}&gt;addN&lt;\/button&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/div&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {\/*&lt;Child2 data={m} onClick={addM}&gt;&lt;\/Child2&gt;*\/}<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;Child2 data={m} onClick={addM}&gt;&lt;\/Child2&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/div&gt;<br> &nbsp;  )<br>\u200b<br>}<br>\u200b<br>const Child2 = React.memo((props)=&gt;{<br> &nbsp; &nbsp;console.log(\"\u8c03\u7528\u4e86CHild\")<br> &nbsp; &nbsp;return(<br> &nbsp; &nbsp; &nbsp; &nbsp;&lt;div&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Child: {props.data}<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;button onClick={props.onClick}&gt;addM&lt;\/button&gt;<br> &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/div&gt;<br> &nbsp;  )<br>})<br>\u200b<\/pre>\n\n\n\n<p>usememo\u7684\u8bed\u6cd5\u7cd6 useCallback<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">    \/\/useMemo\u7684\u8bed\u6cd5\u7cd6\n    const addM =useCallback(\n        ()=&gt;{\n            setM((state)=&gt;{\n                return state+1\n            })\n        },[m]\n    )<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>useState\u7528\u6cd5 useREducer\u7528\u6cd5 useContent\u7528\u6cd5 useEffect &amp; us [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28],"tags":[],"class_list":["post-207","post","type-post","status-publish","format-standard","hentry","category-react"],"_links":{"self":[{"href":"https:\/\/gjweb.top\/index.php?rest_route=\/wp\/v2\/posts\/207","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gjweb.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gjweb.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gjweb.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gjweb.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=207"}],"version-history":[{"count":0,"href":"https:\/\/gjweb.top\/index.php?rest_route=\/wp\/v2\/posts\/207\/revisions"}],"wp:attachment":[{"href":"https:\/\/gjweb.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gjweb.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=207"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gjweb.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}