Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react + redux 课程笔记 #63

Open
amenzai opened this issue Sep 13, 2018 · 2 comments
Open

react + redux 课程笔记 #63

amenzai opened this issue Sep 13, 2018 · 2 comments

Comments

@amenzai
Copy link
Owner

amenzai commented Sep 13, 2018

React + Redux

React基础知识

参考地址

React开发环境

  1. create-react-app

需求分析

页面架构、用户交互流程

项目骨架和页面骨架

项目目录设计、router划分页面,tabbar页面

Mongodb字段设计、axios发送异步请求、redux管理应用数据、组件尽量用antd-mobile

前后端联调

axios发送异步请求:

  • 如何发送,端口不一致,使用proxy配置转发
  • axios拦截器,统一loading处理
  • redux使用异步数据,渲染页面

Redux

参考地址

@amenzai
Copy link
Owner Author

amenzai commented Dec 29, 2018

Socket.io

基于事件的实时双向通信库

  • 基于 websocket 协议
  • 前后端通过事件进行双向通信

use

npm i socket.io

@amenzai
Copy link
Owner Author

amenzai commented Dec 29, 2018

性能优化

  • React 组件性能优化
    • 属性传递优化:传递的属性值,都在constructor里定义好,免得重新渲染造成重复生成对应值造成性能影响
    • 多组件优化
      immutable.js reselect
  • redux 性能优化
  • react 同构

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant