react
Stepan_sj
这个作者很懒,什么都没留下…
展开
-
react的Suspense组件
suspense原创 2022-06-19 17:41:46 · 668 阅读 · 0 评论 -
redux使用
redux使用redux使用storeactionreducerredux使用redux是react状态管理的库。它创建了一个全局的状态树,react组件共享这个状态树。分为三个部分,store,action,reducer。store1.store中存放着需要用到的状态,且只能由一个store2.store由createStore(reducer)创建3. store只能通过acti...原创 2019-07-15 23:10:31 · 122 阅读 · 0 评论 -
react-redux的使用
回忆原本redux的写法1.创建storelet store = createStore(reducer)3、编写action来触发对应的reducerlet action= { type:'aAction'}2、编写reducer 执行action对应的行为,返回一个新的state给storelet reducer= (state,action)=>{ switch(...原创 2019-07-23 20:42:28 · 89 阅读 · 0 评论 -
antd pro学习记录
antd pro是一个后台模板,但上手之后还是有种劝退的感觉,要读懂代码还是得花点功夫。把区块装好会自动生成路由对象,启动项目后为什么会重定向到/user/login?routes: [ { path: '/', component: '../layouts/BlankLayout', routes: [ { pa...原创 2019-08-21 17:38:33 · 1808 阅读 · 0 评论