{"id":352219,"date":"2021-02-12T17:43:52","date_gmt":"2021-02-12T09:43:52","guid":{"rendered":"http:\/\/4563.org\/?p=352219"},"modified":"2021-02-12T17:43:52","modified_gmt":"2021-02-12T09:43:52","slug":"%e6%9c%89%e5%af%b9-react-%e6%84%9f%e5%88%b0%e5%9b%b0%e6%83%91%e7%9a%84%e5%90%97%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=352219","title":{"rendered":"\u6709\u5bf9 React \u611f\u5230\u56f0\u60d1\u7684\u5417\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u6709\u5bf9 React \u611f\u5230\u56f0\u60d1\u7684\u5417\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : sillydaddy <\/span>  <span><i><\/i> 2<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        \u4e4b\u524d\u7528 react \u505a\u70b9\u96f6\u6563\u7684\u754c\u9762\uff0c\u611f\u89c9\u5f88\u597d\u7528\u5f88\u795e\u5947\u3002\u73b0\u5728\u7528\u6765\u5f00\u53d1\u4e00\u4e9b\u81ea\u5df1\u7684\u5c0f\u9879\u76ee\uff0c\u7a81\u7136\u5192\u51fa\u6765\u5f88\u591a\u95ee\u9898\uff0c\u624d\u53d1\u73b0\u539f\u6765\u4e00\u76f4\u6ca1\u7406\u89e3\u5b83\u3002<br \/>\u6bd4\u5982\u7ec4\u4ef6\u4ec0\u4e48\u65f6\u5019\u4f1a\u88ab\u91cd\u65b0\u521b\u5efa\uff0c\u800c\u4ec0\u4e48\u65f6\u5019\u53ea\u662f\u91cd\u65b0\u6e32\u67d3\uff1f<br \/>\u4ec0\u4e48\u65f6\u5019\u7528 props \u4ec0\u4e48\u65f6\u5019\u7528 state \uff1f<br \/>React \u5185\u90e8\u662f\u600e\u6837\u6bd4\u8f83\u524d\u540e\u4e24\u6b21 state \u7684\u5dee\u5f02\u7684\uff0c\u4f1a\u5bfc\u81f4\u54ea\u4e9b\u7ec4\u4ef6\u91cd\u65b0\u6e32\u67d3\uff1f<br \/>React \u7684\u7248\u672c\u66f4\u65b0\u8fd8\u5f88\u5feb\uff0c\u81ea\u5df1\u5bf9\u7ec4\u4ef6\u7684\u751f\u547d\u5468\u671f\u7684\u7406\u89e3\uff0c\u5230\u73b0\u5728\u8fd8\u6ca1\u6765\u5f97\u53ca\u7406\u6e05\u695a\u3002<\/p>\n<p>\u6709\u6ca1\u6709\u4e5f\u66fe\u8ddf\u6211\u4e00\u6837\u72b6\u6001\u7684\uff1f\u611f\u89c9\u8981\u8865\u8865\u5e95\u5c42\u7684\u77e5\u8bc6\u4e86\uff0c\u4e0d\u77e5\u9053\u770b\u70b9\u4ec0\u4e48\u8d44\u6599\u597d\u5462\uff1f      <\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>24<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"5326769\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : coderfuns <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8fd9\u90fd\u662f\u5f88\u57fa\u7840\u7684 react \u77e5\u8bc6\u4e86\u3002\u5efa\u8bae\u770b\u4e00\u4e0b react \u5b98\u65b9\u6587\u6863\uff0c\u770b\u5b8c\u6587\u6863\u518d\u5bf9\u4e0d\u4e86\u89e3\u7684\u90e8\u5206\u5355\u72ec\u67e5\u8be2\u7406\u89e3\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326770\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hahaFck <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u60f3\u77e5\u9053 react \u9002\u5408\u505a\u4f01\u4e1a\u7684\u7ba1\u7406\u7cfb\u7edf\u4e48\uff0c\u5f88\u65e9\u4ee5\u524d\u67e5 react \u8d44\u6599\uff0c\u90fd\u8bf4\u662f\u9002\u5408\u505a\u5355\u9875\u5e94\u7528\u4ec0\u4e48\u7684\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326771\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : jmyz0455 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u4e5f\u521a\u5f00\u59cb\u5b66\uff0cprops \u6211\u89c9\u5f97\u547d\u540d\u4e0a\u5bb9\u6613\u8ddf redux \u6df7\u6dc6\uff0c\u6240\u4ee5\u7528 attrs \u66ff\u4ee3\uff0c\u6240\u4ee5\u6211\u7684\u7406\u89e3\u662f\uff1a<br \/>redux \u62ff\u5230\u7684\u662f props<br \/>\u9700\u8981\u5728\u7ec4\u4ef6\u4e0a\u76f4\u63a5\u4f20\u9012\u7684\u5c31 attrs<br \/>\u7ec4\u4ef6\u91cc\u7684\u72b6\u6001\u7528 state<br \/>\u6709\u4e0d\u5bf9\u8bf7\u6307\u6b63\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326772\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : jmyz0455 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @hahaFck \u9002\u5408\uff0c\u4e0d\u7ba1 vue \u548c react \u90fd\u80fd\u505a\uff0c\u8ddf\u6846\u67b6\u65e0\u5173\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326773\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : 66beta <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u8bf4\u7684\u8fd9\u4e9b\uff0c\u5f97\u770b\u6e90\u7801\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326774\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : akasuv <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6700\u8fd1\u521a\u597d\u5728\u770b\uff0c\u63a8\u8350\u4e24\u4e2a\u6bd4\u8f83\u597d\u7684\u6587\u7ae0\uff0c\u4e00\u4e2a\u662f Sebastian Markb\u00e5ge \u6700\u521d\u6784\u9020 React \u65f6\u7684\u60f3\u6cd5\uff0c\u4e00\u4e2a\u662f\u5173\u4e8e Virtual DOM, Reconciliation \u548c Fiber \u6574\u4f53\u67b6\u6784\u7684\u89e3\u6790\uff0c\u6211\u6ce8\u518c\u8fd8\u6ca1\u6ee1 30 \u5929\uff0c\u4e0d\u80fd\u53d1\u94fe\u63a5 \ud83d\ude41 \u641c\u4e00\u4e0b\u5e94\u8be5\u627e\u5f97\u5230                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326775\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : akasuv <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e24\u7bc7\u6587\u7ae0\u90fd\u5728 Github \u4e0a\u9762 acdlite\/react-fiber-architecture \u548c reactjs\/react-basic                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326776\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : surfwave <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u786e\u5b9e\u50cf 1 \u8bf4\u7684\uff0c\u8fd8\u662f\u591a\u770b\u770b\u5b98\u65b9\u6587\u6863\uff0c\u8fd9\u4e9b\u90fd\u662f\u5f88\u57fa\u7840\u7684\u77e5\u8bc6\u4e86\u3002\u5b98\u65b9\u6587\u6863\u662f\u8ddf\u968f\u7248\u672c\u540c\u6b65\u66f4\u65b0\u7684\uff0c\u800c\u7f51\u4e0a\u7684\u6559\u7a0b\u6709\u4e9b\u90fd\u8fc7\u65f6\u4e86\u3002\u53e6\u5916\uff0c\u73b0\u5728\u80fd\u7528 hooks \u8fd8\u662f\u7528 hooks \u5427\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326777\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : weimo383 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             react \u4e0d\u4f1a\u6bd4\u8f83 state \u7684\u5dee\u5f02\uff0c\u6bcf\u6b21\u90fd\u662f\u65b0\u5efa\u4e00\u4e2a\u72b6\u6001\u3002\u5b83\u6bd4\u8f83\u7684\u662f\u865a\u62df dom \u7684\u5dee\u5f02                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326778\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hantsy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             React \u8bbe\u8ba1\u592a\u8fc7 JS \u4e86\uff0c\u4e00\u5207\u7528 Function \u5199\u8d77\u6765\u5c31\u5bb9\u6613\u5f97\u591a\u3002<\/p>\n<p>\u8981\u6df1\u5c42\u6b21\u7684\u4f7f\u7528\uff0c\u8fd8\u662f\u8981\u5f88\u597d\u7684 JS \u57fa\u7840\u77e5\u8bc6\uff0c\u7279\u522b\u662f high order function \u7b49\uff0c\u4f7f\u7528 middleware \u591a\u5c42\u5d4c\u5957\u5c31\u611f\u89c9\u5bb9\u6613\u4e86\uff0c\u4e0d\u7136\u5f88\u591a\u4ee3\u7801\u592a\u96be\u7406\u89e3\u4e86\u3002<\/p>\n<p>\u8bdd\u8bf4\u56de\u6765\uff0c\u5bf9\u4e8e\u719f\u6089 OOP \u7684\u4eba\uff0c\u8fd8\u662f Angular \u7b80\u5355\u5f97\u591a\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326779\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : azcvcza <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u4e0a react \u5b98\u7f51\u628a\u6587\u6863\u770b\u4e00\u904d\uff0c\u8fd9\u4e9b\u95ee\u9898\u5c31\u89e3\u51b3\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326780\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Baymaxbowen <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @hahaFck antd \u963f\u91cc\u51fa\u7684\u4e86\u89e3\u4e00\u4e0b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326781\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : azcvcza <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             q:\u6bd4\u5982\u7ec4\u4ef6\u4ec0\u4e48\u65f6\u5019\u4f1a\u88ab\u91cd\u65b0\u521b\u5efa\uff0c\u800c\u4ec0\u4e48\u65f6\u5019\u53ea\u662f\u91cd\u65b0\u6e32\u67d3\uff1f<br \/>\u4e00\u822c\u6765\u8bf4\uff0c\u5982\u679c\u662f for \u5faa\u73af\u6e32\u67d3\u7684\u5217\u8868\uff0c\u4f1a\u8981\u6c42\u4f60\u7ed1\u5b9a\u4e00\u4e2a key\uff0creact \u4f1a\u62ff key \u6765\u8ba1\u7b97\u5dee\u5f02\u6765\u51b3\u5b9a\u662f\u5426\u521b\u5efa\u65b0\u7684\uff0c\u8fd8\u662f\u5728\u8001\u7684\u4e0a\u505a\u66ff\u6362<br \/>q:\u4ec0\u4e48\u65f6\u5019\u7528 props \u4ec0\u4e48\u65f6\u5019\u7528 state \uff1f<br \/>state \u4e13\u6ce8\u4e8e\u7ec4\u4ef6\u5185\u90e8\u72b6\u6001\uff0c\u80fd\u7528 props \u8ba1\u7b97\u51fa\u6765\u7684\u4e00\u822c\u90fd\u4e0d\u7528\u5b58\u5728 state \u91cc\u8fb9<br \/>q:React \u5185\u90e8\u662f\u600e\u6837\u6bd4\u8f83\u524d\u540e\u4e24\u6b21 state \u7684\u5dee\u5f02\u7684\uff0c\u4f1a\u5bfc\u81f4\u54ea\u4e9b\u7ec4\u4ef6\u91cd\u65b0\u6e32\u67d3\uff1f<br \/>\u4e00\u822c\u800c\u8a00\uff0c\u901a\u8fc7 setState \u5f15\u53d1\u7684 state \u53d8\u5316\u4f1a\u89e6\u53d1\u5f53\u524d\u7ec4\u4ef6\u66f4\u65b0\uff1b\u5982\u679c\u6709\u64cd\u4f5c\u4fee\u6539\u5230\u4e0a\u5c42\u5bb9\u5668\u7684\u72b6\u6001\uff0c\u90a3\u4e0a\u5c42\u5bb9\u5668\u548c\u4ed6\u88c5\u7684\u4e1c\u897f\u90fd\u4f1a\u4e00\u8d77\u66f4\u66f4\u65b0\uff0c\u4e5f\u5373\u7ec4\u4ef6\u6811\u4e2d\uff0c\u8be5\u8282\u70b9\u548c\u4ed6\u7684\u53f6\u5b50\u8282\u70b9\u4f1a\u4e00\u8def\u66f4\u65b0\u4e0b\u53bb<br \/>q:React \u7684\u7248\u672c\u66f4\u65b0\u8fd8\u5f88\u5feb\uff0c\u81ea\u5df1\u5bf9\u7ec4\u4ef6\u7684\u751f\u547d\u5468\u671f\u7684\u7406\u89e3\uff0c\u5230\u73b0\u5728\u8fd8\u6ca1\u6765\u5f97\u53ca\u7406\u6e05\u695a\u3002<br \/>class \u7ec4\u4ef6\u6bd4\u8f83\u6ce8\u91cd\u4e00\u4e2a\u7ec4\u4ef6\u662f\u8be5\u600e\u4e48\u5199\u7684\uff0c\u4f46\u662f\u8be5\u7ec4\u4ef6\u7684\u4e00\u4e9b\u5171\u6027\u884c\u4e3a\u4f1a\u5206\u6563\u5728\u5404\u4e2a\u751f\u547d\u5468\u671f\u91cc\uff0c\u4f8b\u5982 didMount \u7684\u65f6\u5019\u6ce8\u518c\u4e8b\u4ef6\u76d1\u542c\uff0c\u7f51\u7edc\u8bf7\u6c42\uff0cwillUnMount \u7684\u65f6\u5019\u6e05\u9664\u4e8b\u4ef6\u76d1\u542c\uff1b function \u7ec4\u4ef6\u914d\u5408 useHook \u53ef\u4ee5\u628a\u6563\u843d\u7684\u903b\u8f91\u62bd\u8c61\u51fa\u6765\uff0c\u5b9e\u73b0\u903b\u8f91\u590d\u7528\uff0c\u7f3a\u70b9\u5c31\u662f\u4e0d\u80fd\u50cf class \u7ec4\u4ef6\u4e00\u6837\u65b9\u4fbf\u7684\u62ff ref \u6765\u63a7\u5236\u5177\u4f53\u884c\u4e3a\uff08\u53ef\u4ee5\u901a\u8fc7 forwardRef \u548c useImperativeHandle \u66ff\u4ee3\u5b9e\u73b0\uff09                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326782\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : sillydaddy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @hantsy \u6211\u4e0d\u592a\u4e60\u60ef\u7528 Function\uff0c\u611f\u89c9\u7ec4\u4ef6\u8fd8\u662f\u548c\u7c7b\u6bd4\u8f83\u76f8\u8fd1\uff5e\uff5e\u6bd4\u5982\u5b83\u4e5f\u6709\u5185\u90e8\u72b6\u6001\uff0c\u4e5f\u662f\u5c01\u88c5\u7684\u4e00\u4e9b\u76f8\u5173\u8054\u7684\u884c\u4e3a\u3002<\/p>\n<p>\u53ea\u4e0d\u8fc7\u5bf9\u8fd9\u4e2a\u9ed1\u76d2\u5b50\u7684\u884c\u4e3a\u4e0d\u6df1\u5165\u7406\u89e3\uff0c\u4f1a\u6709\u5f88\u591a\u4e1c\u897f\u51fa\u9519\u3002\u6bd4\u5982\u6e32\u67d3\u6548\u7387\u7b49\u7b49\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326783\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : akasuv <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @azcvcza \u201c\u7f3a\u70b9\u5c31\u662f\u4e0d\u80fd\u50cf class \u7ec4\u4ef6\u4e00\u6837\u65b9\u4fbf\u7684\u62ff ref \u6765\u63a7\u5236\u5177\u4f53\u884c\u4e3a\u201d\uff0c\u51fd\u6570\u7ec4\u4ef6\u91cc\u6709 useRef \u8fd9\u4e2a\u94a9\u5b50                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326784\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yanulg <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u628a\u5b98\u65b9\u6587\u6863\u770b\u4e00\u904d\uff0cstate \u662f\u7ec4\u4ef6\u5185\u7684\u72b6\u6001\u7ba1\u7406\uff0cprops \u662f\u7ed9\u5b50\u7ec4\u4ef6\u4f20\u503c\u7684\uff0c\u5148\u4e0d\u7528 hooks\uff0c\u7528 class component \u5148\u7406\u89e3\u4e00\u4e0b react \u7684\u7528\u6cd5\uff0c\u4e4b\u540e\u518d\u8003\u8651 hooks \u8fd9\u79cd\u6ca1\u6709\u660e\u663e\u4f18\u70b9\u4f46\u662f react \u56e2\u961f\u4f7f\u52b2\u63a8\u7684\u4e1c\u897f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326785\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : chuhemiao <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u63a8\u8350\u5361\u603b\u7684 React \u6280\u672f\u63ed\u79d8 https:\/\/react.iamkasong.com\/                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326786\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : weixiangzhe <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6700\u8fd1\u4e5f\u5728\u770b\u6e90\u7801\uff0c\u63a8\u8350\u8fd9\u4e9b\u6587\u7ae0<br \/>https:\/\/pomb.us\/build-your-own-react\/<br \/>https:\/\/indepth.dev\/posts\/1008\/inside-fiber-in-depth-overview-of-the-new-reconciliation-algorithm-in-react<br \/>https:\/\/indepth.dev\/posts\/1009\/in-depth-explanation-of-state-and-props-update-in-react<br \/>https:\/\/react.iamkasong.com\/ \u5361\u603b\u52a0\u4e00                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326787\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Leviathann <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             react \u6ca1\u90a3\u4e48\u9ad8\u7ea7<br \/>\u5c31\u662f\u9760 setstate \u624b\u52a8\u89e6\u53d1\u548c props \u6d45\u6bd4\u8f83\u81ea\u52a8\u89e6\u53d1\u6e32\u67d3                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326788\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Torpedo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @yanulg hook \u4f18\u70b9\u633a\u660e\u663e\u7684\uff0c\u7279\u522b\u5bb9\u6613\u7ec4\u5408\uff0choc \u7ec4\u5408\u592a\u4f9d\u8d56\u987a\u5e8f\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326789\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : azcvcza <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @akasuv \u5982\u679c\u662f\u5230\u4e86\u5177\u4f53\u63a7\u5236 dom \u7ec4\u4ef6\u7684\u8868\u73b0\u7684\u65f6\u5019\uff0cuseRef \u4f1a\u63d0\u9192\u4f60\u4e0d\u80fd\u5728\u6574\u4e2a\u7684 function \u7ec4\u4ef6\u4e0a\u7528\uff0c\u4f46\u662f\u53ef\u4ee5\u5728 function \u7ec4\u4ef6\u4e2d render \u51fa\u6765\u7684 jsx \u4e2d\u7684\u5143\u7d20\u4e0a\u7ed1\uff0c\u6709\u4e9b\u65f6\u5019\u8fbe\u4e0d\u5230\u60f3\u8981\u7684\u6548\u679c\uff0c\u9700\u8981\u7528 forwardRef \u548c useImperativeHandle \u53d6\u4ee3\u3002\u4f8b\u5982\u591a\u4e2a\u5927\u7684\u76f8\u4f3c\u8868\u5355\uff0c\u60f3\u8981\u63a7\u5236\u8868\u5355\u7684 validate \u884c\u4e3a\u7684\u65f6\u5019                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326790\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Rocketer <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @jmyz0455 \u521a\u5f00\u59cb\u5b66\u7684\u8bdd\uff0c\u8fd8\u662f\u522b\u628a redux \u63ba\u548c\u8fdb\u6765\u4e86\u3002\u5148\u8bd5\u7740\u5c3d\u91cf\u4e0d\u7528 redux\uff0c\u5168\u7528 hooks \u89e3\u51b3\uff0c\u5b9e\u5728\u4e0d\u884c\u4e86\u518d\u8003\u8651 redux \uff08\u5b9e\u9645\u4e0a\u5f88\u5c11\u9047\u5230\u975e redux \u4e0d\u53ef\u7684\u9879\u76ee\uff09\u3002<\/p>\n<p>redux \u662f react \u65e9\u671f\u8fd8\u4e0d\u592a\u5b8c\u5584\u65f6\u7684\u5fc5\u5907\u7ec4\u4ef6\uff0c\u73b0\u5728\u8fd8\u6709\u5f88\u591a\u4eba\u7528\u53ea\u662f\u56e0\u4e3a\u8001\u7a0b\u5e8f\u5458\u4eec\u4e60\u60ef\u4e86\uff0c\u5e76\u4e0d\u4ee3\u8868\u5b83\u662f\u5fc5\u8981\u7684\uff0c\u751a\u81f3\u90fd\u4e0d\u80fd\u7b97\u662f\u4e00\u4e2a\u597d\u7684\u5f00\u53d1\u5b9e\u8df5\u3002<\/p>\n<p>redux \u592a\u91cd\u4e86\uff0c\u4e0d\u4ec5\u62d6\u6162\u5f00\u53d1\u901f\u5ea6\uff0c\u4e5f\u62d6\u6162\u8fd0\u884c\u901f\u5ea6\uff0c\u80fd\u4e0d\u7528\u8fd8\u662f\u5c3d\u91cf\u522b\u7528\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326791\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : jmyz0455 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Rocketer \u53ef\u80fd\u6211\u770b\u7684\u6559\u7a0b\u843d\u540e\u4e86\uff1f\u6211\u8fd8\u6ca1\u5b66\u5230 Hooks\uff0c\u770b\u770b\u5982\u4f55\u66ff\u4ee3 Redux\/Mobx \u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326792\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : cgpiao <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             react \u72b6\u6001\u7ba1\u7406\u4e4b\u96be\u7528\u60f3\u8ba9\u4eba\u653e\u5f03\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u6709\u5bf9 React \u611f\u5230\u56f0\u60d1\u7684\u5417\uff1f &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/352219"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=352219"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/352219\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=352219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=352219"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=352219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}