React
文章平均质量分 63
hezebin
https://hezebin.com
展开
-
Axios使用封装和跨域
1.安装npm install axios --save# 或者yarn add axios2.请求方式Get、Delete请求:这类请求也称作query请求。第一种方式为拼接url的形式传参:axios.get('/user?username=korbin&password=12345').then(function (res) { console.log(res);}).catch(function (err) { console.log(err);});原创 2021-10-03 03:34:57 · 647 阅读 · 0 评论 -
React中ESLint对a标签href属性警告
问题描述在React中如果使用了a标签,但是又没有给a标签的href属性赋值有效的链接地址,则ESLint会警告,看着很烦。The href attribute is required for an anchor to be keyboard accessible. Provide a valid, navigable address as the href value. If you cannot provide an href, but still need the element to resem原创 2021-09-08 00:25:18 · 1781 阅读 · 0 评论 -
React 笔记
文章目录简介虚拟DOMReact脚手架函数式组件类式组件组件3大核心属性React路由setState生命周期React UI组件库 AntdLazyLoadFragmentContextRedux组件通信方式总结Component优化Error boundary(错误边界)使用自定义配置文件CSS IN JS持续补充中…简介由Facebook开源的,用于动态构建用户界面的 JavaScript 库(只关注于视图)。具有如下特点: 1.声明式编码2.组件化编码3.React Native 编原创 2021-08-31 23:26:02 · 170 阅读 · 0 评论