随笔分类 -  dev-javascript

摘要:from: https://javascript.info/promise-basics Promise Imagine that you’re a top singer, and fans ask day and night for your upcoming song. To get some 阅读全文
posted @ 2024-06-26 22:14 saaspeter 阅读(7) 评论(0) 推荐(0) 编辑
摘要:通常情况下不要用Ref去获取child component: In React, it’s generally recommended to use props and state to manage your component data flow. While refs are a powerf 阅读全文
posted @ 2024-04-02 15:31 saaspeter 阅读(4) 评论(0) 推荐(0) 编辑
摘要:https://medium.com/@bobjunior542/effortlessly-use-react-fc-with-typescript-best-practices-91aa7fc057c7 React Function Components (FCs) have become a p 阅读全文
posted @ 2024-04-02 15:10 saaspeter 阅读(126) 评论(0) 推荐(0) 编辑
摘要:转载自:https://www.cnblogs.com/alexander3714/p/14268982.html Part1内容# 安装typescript编译器# 全局安装:npm install -g typescript 在命令行中查看ts编译器版本判断是否安装成功。 TypeScript 阅读全文
posted @ 2024-03-21 11:16 saaspeter 阅读(23) 评论(0) 推荐(0) 编辑
摘要:摘抄自:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures Closures A closure is the combination of a function bundled together (enclosed) w 阅读全文
posted @ 2023-06-09 17:36 saaspeter 阅读(12) 评论(0) 推荐(0) 编辑
摘要:最早直接采用brew安装,如下: brew install node@18 brew uninstall node@18 // 卸载 但学习的项目用的是老版本node,所以卸载了,用NVM来管理多版本node,参考这篇文章: https://blog.bigoodyssey.com/how-to-m 阅读全文
posted @ 2023-05-31 17:51 saaspeter 阅读(363) 评论(0) 推荐(0) 编辑
摘要:摘抄自:https://medium.com/@agzuniverse/webpack-and-babel-what-are-they-and-how-to-use-them-with-react-5807afc82ca8 Webpack and Babel — Tools we can’t cod 阅读全文
posted @ 2023-05-27 23:34 saaspeter 阅读(6) 评论(0) 推荐(0) 编辑
摘要:What is this? In JavaScript, the this keyword refers to an object. Which object depends on how this is being invoked (used or called). The this keywor 阅读全文
posted @ 2023-05-27 17:09 saaspeter 阅读(7) 评论(0) 推荐(0) 编辑
摘要:参考: https://segmentfault.com/a/1190000007535316 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise https://devel 阅读全文
posted @ 2023-05-25 23:30 saaspeter 阅读(9) 评论(0) 推荐(0) 编辑
摘要:js中的prototype绝对是js的一个重要知识点,有点像delegate的模式,和oop对象形式还是有些差别的,尽管可以做同样的事情。 简要学习可以参见:https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Objec 阅读全文
posted @ 2023-05-25 15:49 saaspeter 阅读(5) 评论(0) 推荐(0) 编辑
摘要:我们可以这样create一个object: const person1 = { name: "Chris", introduceSelf() { console.log(`Hi! I'm ${this.name}.`); }, }; 但是当我们需要创建多个对象的时候,每次都要重复同样的code,这时 阅读全文
posted @ 2023-05-25 15:25 saaspeter 阅读(8) 评论(0) 推荐(0) 编辑
摘要:在介绍xss的英文文章中常看到sink这个词语。查了下: A sink is a potentially dangerous JavaScript function that can caused undesirable effects if attacker controlled data is 阅读全文
posted @ 2023-03-21 16:59 saaspeter 阅读(153) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示