React 技术栈
Web基础
培训
官网
示例
App
工具
- 包管理器
- 构建器
- 编译器
- React 开发者工具
- 静态类型检查器
- Prettier # 编码风格
- ESLint en | ESLint cn | ESLint 实战 # 检查警告
- Storybook # 组件预览
- SW Precache Webpack Plugin
技术
- react router en | react router cn ※
- react bootstrap en | react bootstrap cn ※
- redux en | redux cn ※
- Middleware(中间件)
- Sass en | Sass cn | Sassmeister SASS用法指南 ※
- Immutable.js en | Immutable.js cn ※
- Moment.js en | Moment.js cn ※
Underscore.js en | Underscore.js cn | Lodash en | Lodash cn ※ Ramda.js
Jest en | Jest cn | Jsdom | Enzyme | Chai | Sinon.js | EnzymeMatchers
-
相关
- CDN
- XSS(跨站脚本攻击)
- Npm Scripts 使用指南
- 搞清楚React项目中支持的Polyfills.
- Prettier 统一团队的代码风格
- React 如何国际化 ?
FAQ
什么是声明式编程?
以声明式编写UI,可以让你的代码更加可靠,且方便调试
JavaScript Bind 问题
https://www.ibm.com/developerworks/cn/web/1207_wangqf_jsthis/index.html
https://www.smashingmagazine.com/2014/01/understanding-javascript-function-prototype-bind/
如果您需要根据内容动态更新页面标题,可以使用浏览器的document.title API。对于要从React组件更改标题的更复杂的场景,可以使用React Helmet(一个第三方库)。
熟悉使用Visual Studio Code
Visual Studio Code 集成 Chrome 插件.
Flow是一种静态类型的检查器,可以帮助您编写更少错误的代码。如果您是这个概念的新手,请参阅JavaScript中使用静态类型的介绍 。
.env 文件的特定设置 分别代表含义 ?
在开发中使用HTTPS
如何确保 ? 请记住,代理仅在开发中有效 (使用
npm start),并且由您来确保像/api/todos这样的URL指向生产中的正确的东西。您不必使用/api前缀。任何无法识别的没有text/html接收标头的请求,将被重定向到指定的proxy.什么是服务器渲染? React如何支持服务器渲染?
什么是预渲染成静态HTML文件?
HTML5 history API (pushState, replaceState, popState)
<Switch>对于转场动画也非常适用
1
2Access-Control-Allow-Origin
Fetch API cannot load http://localhost:4000/api/todos. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.