随笔分类 -  React

摘要:苹果提供的 VoiceOver 针对不便人员或者特殊使用习惯的用户帮助很大。 打开Mac VoiceOver 快捷键: command + F5 为了能够支持VoiceOver, 在前段程序中一些写法需要注意。 1. chrome 对于<a/> 能够自动 tab 上,无论是否手动添加 tabInde 阅读全文
posted @ 2020-02-21 18:59 多吃核桃
摘要:组件可以接受任意 props,包括基本数据类型,React 元素以及函数 因为 Props 可以接受 React 元素,React 组件之间就会有各种 组合 和 包含 的可能。 children prop 来传递子组件 自定义prop 来传递组件 当参数传递 上面3种形式,可以组合着用 阅读全文
posted @ 2019-12-30 16:33 多吃核桃 阅读(160) 评论(0) 推荐(0)
摘要:if 或者条件运算符 来 创建元素 元素变量 元素变量 与运算符 && JavaScript 中,true && expression 总是会返回 expression, 而 false && expression 总是会返回 false。 因此,如果条件是 true,&& 右侧的元素就会被渲染,如 阅读全文
posted @ 2019-12-30 14:00 多吃核桃 阅读(179) 评论(0) 推荐(0)
摘要:React 通过管理 state 来实现组件管理 构造函数是唯一可以给 this.state 赋值的地方, 更新 state 使用 this.setState() 来实现 this.setState() 被调用, React 会重新调用 render 方法来渲染 UI. 如果父组件调用了 this. 阅读全文
posted @ 2019-12-29 16:56 多吃核桃 阅读(184) 评论(0) 推荐(0)
摘要:参考: https://www.taniarascia.com/getting-started-with-react/ 1. React is a JavaScript library, 2. React is NOT a framework , 3. React is an open-source 阅读全文
posted @ 2019-12-28 19:43 多吃核桃 阅读(281) 评论(0) 推荐(0)
摘要:参考:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/A_re-introduction_to_JavaScript Javascript 类型: 数字: JavaScript 不区分整数值和浮点数值,所有数字在 JavaScript 阅读全文
posted @ 2019-12-22 11:35 多吃核桃 阅读(299) 评论(0) 推荐(0)