react概念
https://blog.csdn.net/juse__we/article/details/89249265
react高级指引
https://blog.csdn.net/juse__we/article/details/89282529
react更新的生命周期
https://www.cnblogs.com/gdsblog/p/7348375.html
react-router
https://blog.csdn.net/juse__we/article/details/89357649
https://www.cnblogs.com/zhanghuiming/p/7592132.html
https://www.jianshu.com/p/548674270455
https://blog.csdn.net/Free_Wind22/article/details/80773692
react-redux
https://blog.csdn.net/juse__we/article/details/89319674
https://www.cnblogs.com/jsydb/p/9480216.html
https://blog.csdn.net/juse__we/article/details/89319674
redux通过provide向子组件传递store
https://www.jianshu.com/p/186956ac666a
redux中间间
https://www.jianshu.com/p/ae7b5a2f78ae
简单来讲,Redux middleware 提供了一个分类处理 action 的机会。在 middleware 中,我们可以检阅每一个流过的 action,并挑选出特定类型的 action 进行相应操作,以此来改变 action。
const doNothingMidddleware = (dispatch, getState) => next => action => next(action)上面这个函数接受一个对象作为参数,对象的参数上有两个字段 dispatch 和 getState,分别代表着 Redux Store 上的两个同名函数,但需要注意的是并不是所有的中间件都会用到这两个函数。然后 doNothingMidddleware 返回的函数接受一个 next 类型的参数,这个 next 是一个函数,如果调用了它,就代表着这个中间件完成了自己的职能,并将对 action 控制权交予下一个中间件。但需要注意的是,这个函数还不是处理 action 对象的函数,它所返回的那个以 action 为参数的函数才是。最后以 action 为参数的函数对传入的 action 对象进行处理,
1redux异步流管理问题
redux-saga
redux-saga是一个管理redux应用异步操作的中间件,用于代替 redux-thunk 的。它通过创建 Sagas 将所有异步操作逻辑存放在一个地方进行集中处理,以此将react中的同步操作与异步操作区分开来,以便于后期的管理与维护。
https://redux-saga-in-chinese.js.org/docs/introduction/BeginnerTutorial.html
https://blog.csdn.net/juse__we/article/details/107598535
react解决跨浏览器兼容性问题
creat-react-app结合proxy
https://blog.csdn.net/qi_xiao2/article/details/102859639
https://www.cnblogs.com/zhourongcode/p/10104366.html
// setupProxy.jsconst { createProxyMiddleware } = require('http-proxy-middleware');module.exports = function(app) { app.use( createProxyMiddleware("/mock", { target: "http://localhost:8000/", pathRewrite:{ '^/mock':'' }, changeOrigin: true }) );}; creat-react-app结合react-router-domhttps://reacttraining.com/react-router/web/example/route-config
react-router和react-router-dom的区别react-router: 实现了路由的核心功能
react-router-dom: 基于react-router,加入了在浏览器运行环境下的一些功能,例如:Link组件,会渲染一个a标签,Link组件源码a标签行; BrowserRouter和HashRouter组件,前者使用pushState和popState事件构建路由,后者使用window.location.hash和hashchange事件构建路由。
react-router-native: 基于react-router,类似react-router-dom,加入了react-native运行环境下的一些功能。