forked from jdf2e/jdc_fe_guide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path33d8bdb6.9526f5de.js
1 lines (1 loc) · 5.73 KB
/
33d8bdb6.9526f5de.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{156:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return o})),n.d(t,"metadata",(function(){return c})),n.d(t,"rightToc",(function(){return l})),n.d(t,"default",(function(){return p}));var r=n(2),a=n(9),i=(n(0),n(199)),o={title:"\u72b6\u6001\u7ba1\u7406\u89c4\u8303"},c={id:"react/state",title:"\u72b6\u6001\u7ba1\u7406\u89c4\u8303",description:"\u7ea6\u5b9a:",source:"@site/docs/react/state.md",permalink:"/jdc_fe_guide/docs/react/state",editUrl:"https://git.jd.com/JDC_FE/jdc_fe_guide/tree/master/docs/react/state.md",sidebar:"someSidebar",previous:{title:"Hooks",permalink:"/jdc_fe_guide/docs/react/hooks"},next:{title:"\u76ee\u5f55\u7ed3\u6784",permalink:"/jdc_fe_guide/docs/react/tree"}},l=[],b={rightToc:l};function p(e){var t=e.components,n=Object(a.a)(e,["components"]);return Object(i.b)("wrapper",Object(r.a)({},b,n,{components:t,mdxType:"MDXLayout"}),Object(i.b)("p",null,"\u7ea6\u5b9a:"),Object(i.b)("ol",null,Object(i.b)("li",{parentName:"ol"},"\u5f53\u6211\u4eec\u9879\u76ee\u4e2d\u590d\u6742\u7a0b\u5ea6\u8f83\u4f4e\u65f6\uff0c\u5efa\u8bae\u53ea\u7528state\u5c31\u53ef\u4ee5\u4e86"),Object(i.b)("li",{parentName:"ol"},"\u5982\u679c\u4ec5\u4ec5\u56e0\u4e3a\u5b58\u5728\u591a\u5c42\u4f20\u9012\u6570\u636e\u7684\u573a\u666f\uff0c\u4e0d\u5efa\u8bae\u4f7f\u7528",Object(i.b)("inlineCode",{parentName:"li"},"mobx"),"\u6216",Object(i.b)("inlineCode",{parentName:"li"},"redux"),"\uff0c\u53ef\u4f7f\u7528",Object(i.b)("inlineCode",{parentName:"li"},"context"),"\u89e3\u51b3"),Object(i.b)("li",{parentName:"ol"},"\u5982\u679c\u4ec5\u4ec5\u56e0\u4e3a\u5938\u8def\u7531\u6570\u636e\u5171\u4eab\uff0c\u4e0d\u5efa\u8bae\u4f7f\u7528",Object(i.b)("inlineCode",{parentName:"li"},"mobx"),"\u6216",Object(i.b)("inlineCode",{parentName:"li"},"redux"),"\uff0c\u53ef\u4f7f\u7528",Object(i.b)("inlineCode",{parentName:"li"},"context"),"\u6216\u8005",Object(i.b)("inlineCode",{parentName:"li"},"\u8def\u7531\u4f20\u53c2"),"\u89e3\u51b3"),Object(i.b)("li",{parentName:"ol"},"\u5982\u679c\u4e1a\u52a1\u590d\u6742\uff0c\u9700\u8981\u4f7f\u7528\u7b2c\u4e09\u65b9\u72b6\u6001\u7ba1\u7406\u89e3\u51b3\u590d\u6742\u5ea6\uff0c\u770b\u4e0b\u4e00\u6761"),Object(i.b)("li",{parentName:"ol"},"\u5f53\u9879\u76ee\u590d\u6742\u5ea6\u4e00\u822c\uff0c\u5c0f\u89c4\u6a21\u56e2\u961f\u6216\u5f00\u53d1\u5468\u671f\u8f83\u77ed\u3001\u8981\u6c42\u5feb\u901f\u4e0a\u7ebf\u65f6\uff0c\u63a8\u8350\u4f7f\u7528",Object(i.b)("inlineCode",{parentName:"li"},"mobx")),Object(i.b)("li",{parentName:"ol"},"\u5f53\u9879\u76ee\u590d\u6742\u5ea6\u8f83\u9ad8\uff0c\u56e2\u961f\u89c4\u6a21\u8f83\u5927\u6216\u8981\u6c42\u5bf9\u4e8b\u4ef6\u5206\u53d1\u5904\u7406\u53ef\u76d1\u63a7\u53ef\u56de\u6eaf\u65f6\uff0c\u63a8\u8350\u4f7f\u7528",Object(i.b)("inlineCode",{parentName:"li"},"redux"),"\uff0c\u53ef\u5c1d\u8bd5\u4f7f\u7528 ",Object(i.b)("inlineCode",{parentName:"li"},"rematch"),"\u6216",Object(i.b)("inlineCode",{parentName:"li"},"@reduxjs/toolkit"),"\uff0c\u51cf\u5c11\u6a21\u677f\u4ee3\u7801"),Object(i.b)("li",{parentName:"ol"},"\u5982\u679c\u540e\u7aef\u6570\u636e\u7b26\u5408",Object(i.b)("inlineCode",{parentName:"li"},"REST"),"\u98ce\u683c\u4e14",Object(i.b)("inlineCode",{parentName:"li"},"\u6570\u636e\u683c\u5f0f\u7edf\u4e00"),"\u4e14",Object(i.b)("inlineCode",{parentName:"li"},"\u91cd\u590d\u6570\u636e\u8f83\u591a"),"\uff0c\u63a8\u8350\u4f7f\u7528",Object(i.b)("inlineCode",{parentName:"li"},"\u6241\u5e73\u5316"),"\u5904\u7406\u6570\u636e\uff0c\u53c2\u8003",Object(i.b)("inlineCode",{parentName:"li"},"normalizr"),"\uff0c",Object(i.b)("inlineCode",{parentName:"li"},"eg: twitter \u77e5\u4e4e "))))}p.isMDXComponent=!0},199:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return O}));var r=n(0),a=n.n(r);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var b=a.a.createContext({}),p=function(e){var t=a.a.useContext(b),n=t;return e&&(n="function"==typeof e?e(t):c({},t,{},e)),n},u=function(e){var t=p(e.components);return a.a.createElement(b.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},m=Object(r.forwardRef)((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,o=e.parentName,b=l(e,["components","mdxType","originalType","parentName"]),u=p(n),m=r,O=u["".concat(o,".").concat(m)]||u[m]||d[m]||i;return n?a.a.createElement(O,c({ref:t},b,{components:n})):a.a.createElement(O,c({ref:t},b))}));function O(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,o[1]=c;for(var b=2;b<i;b++)o[b]=n[b];return a.a.createElement.apply(null,o)}return a.a.createElement.apply(null,n)}m.displayName="MDXCreateElement"}}]);