上一页 1 2 3 4 5 6 7 8 ··· 18 下一页
摘要: Initialization setup props and state Mounting componentWillMount render componentDidMount Updation props 发生变化 componentWillReceiveProps // 1.从父组件接收参数 阅读全文
posted @ 2023-02-24 17:34 Better-HTQ 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 原始状态 <html> <head> <meta charset="utf-8"> <style> #main { width:300px; height:300px; border:1px solid black; } .a1, .a3 { height: 50px } .a2 { height: 阅读全文
posted @ 2023-02-20 15:54 Better-HTQ 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 全局安装脚手架 npm install -g create-react-app 创建项目 npx create-react-app my-app 运行项目 cd my-app npm start 阅读全文
posted @ 2023-02-19 16:09 Better-HTQ 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 1. 整洁代码 1.1 要有代码 代码不再是问题;我们应当关注模型和需求。代码很快就能自动产出。这种言论是不正确的。 因为代码呈现了需求的细节,在某些层面上,这些细节无法被忽略或抽象。 即使将来语言的抽象程度继续提升,那么用这种语言开发也同样是代码。同样需要严谨、规范、精确和详细。 1.2 糟糕的代 阅读全文
posted @ 2023-02-08 20:50 Better-HTQ 阅读(70) 评论(0) 推荐(0) 编辑
摘要: 本文翻译自 https://hacks.mozilla.org/2017/02/a-crash-course-in-just-in-time-jit-compilers/ JavaScript 一开始很慢,但后来由于有称为 JIT 的东西变得更快了。那么 JIT 是如何工作的呢? JavaScrip 阅读全文
posted @ 2023-01-31 17:40 Better-HTQ 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 传统单例实现 基础实现 // 方式一:instance维护在对象中 // ES5 var Singleton = function (name) { this.name = name this.instance = null }; Singleton.prototype.getName = func 阅读全文
posted @ 2023-01-13 17:20 Better-HTQ 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 函数柯里化(function currying)。currying 的概念最早由俄国数学家 Moses Schönfinkel 发明,而后由著名的数理逻辑学家 Haskell Curry 将其丰富和发展,currying 由此得名。 currying 又称部分求值。一个 currying 的函数首先 阅读全文
posted @ 2023-01-11 17:03 Better-HTQ 阅读(163) 评论(0) 推荐(0) 编辑
摘要: // 生成随机数 randomNum(max, min) { return parseInt(Math.random() * (max - min)) + min; }, // 生成随机颜色 randomColor(min, max) { let r = this.randomNum(min, ma 阅读全文
posted @ 2022-12-31 15:25 Better-HTQ 阅读(47) 评论(0) 推荐(0) 编辑
摘要: 1. 滚动条相关的CSS伪元素 ::-webkit-scrollbar 滚动条整体部分 ::-webkit-scrollbar-button 滚动条两端的按钮 ::-webkit-scrollbar-track 外层轨道 ::-webkit-scrollbar-track-piece 内层轨道,滚动 阅读全文
posted @ 2022-12-14 17:37 Better-HTQ 阅读(797) 评论(0) 推荐(0) 编辑
摘要: 第9章 了解听众 在彼此竞争的公司文化环境中,我们不需要对每个人都友好,更重要的是关注如何变得“厚脸皮”以及如何自信、有说服力地展示自己的想法。当然这并不是说要抨击别人,我们只是做自己而已。不过,这可能意味着挑战别人,也被别人挑战。在这样的文化中,平时讲话要表现自己的信念和自信。了解组织文化规则(不 阅读全文
posted @ 2022-12-03 14:20 Better-HTQ 阅读(87) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 18 下一页