OpenAI Chat-GPT WTFFFFFFFFEN
Prevent a cross-origin iframe from scrolling its parentEN
Accidentally found in business work that after embedding some specific iframes, the top-level page will automatically scroll to the iframe, at the the time when iframe is loaded.
聊聊纯 CSS 图标中文
在 重新构想原子化 CSS 中,我提到了 UnoCSS 的一个预设,它提供了在纯 CSS 中按需使用任何图标的能力。在这篇文章中,我想和大家分享下它的工作原理。
JavaScript 中的硬绑定与软绑定中文
在 JavaScript 中,this 的绑定是动态的,在函数被调用的时候绑定,它指向什么完全取决于函数在哪里调用,绑定规则有默认绑定、隐式绑定、显式绑定、 new 绑定等,本文就硬绑定与软绑定的原理进行深入介绍。
JS / TS 中的重载 (Overload)中文
重载,就是函数或者方法有相同的名称,但是参数列表不相同的情形。一直觉得 JavaScript 是没有重载的,直到 TypeScript 的出现,所以我一直觉得 JavaScript 没有重载,TypeScript 才有,但是现在看来我是错的。
Best Practices for Writing Super Readable CodeEN
Code readability is fundamental for development — it is key to maintainability and working together with a team. This article will detail the best practices when writing readable code in JavaScript.
Watching "Coding Interview with Dan Abramov"EN
Having so much fun watching "Coding Interview with Dan"
从 UNMET PEER DEPENDENCY 中理解依赖版本管理中文
日常开发过程中可能会遇到依赖管理器 npm 或 yarn 提示 unmet peer dependency,本文对提示出现的原因和依赖版本管理规则进行介绍
深入浅出前端测试 —— Jest中文
当我第一次听说 TDD (Test-Driven Develop, 测试驱动开发) 的时候,我首先想到的是测试小姐姐们想搞事情?后面发现这个玩意儿是想干掉测试。那好,下面我们开始从简单的单元测试上手 Jest 测试框架。
Build your own "redux" from scratchEN
Redux is probably a buzz word that slips into the lingo of React developers. If your reaction has been like mine, it’s always been one of those things where I didn’t know much about it other than this official definition. I never could answer: “Why should I use Redux?”
JavaScript 中的正则表达式中文
正则表达式的基本组成元素可以分为:字符和元字符。字符很好理解,通常正则表达式里面使用的就是数字、英文字母。而元字符,也被称为特殊字符,是一些用来表示特殊语义的字符。如 ^ 表示非, | 表示或等。利用这些元字符,才能构造出强大的表达式模式 (pattern)。
什么是依赖注入中文
第一次听到这个说法是在 Angular 的时候,我们都知道 Angular 内部大量使用了依赖注入。虽然我到现在也没玩过 😂,不过这并不影响我们来探究一下它。
Start testing your react appEN
When I first started learning to test my apps back in the day, I would get very frustrated with the different types, styles and technologies used for testing, along with the disbanded array of blog posts, tutorials and articles. I found this to be true as well for React testing.
React Diff 原理中文
跟 Vue 一致,React 通过引入 Virtual DOM 的概念,极大地避免无效的 Dom 操作,使我们的页面的构建效率提到了极大的提升。而 diff 算法就是更高效地通过对比新旧 Virtual DOM 来找出真正的 Dom 变化之处。
初识 React Fiber中文
React Fiber 是 Facebook 花费两年余时间对 React 做出的一个重大改变与优化,是对 React 核心算法的一次重新实现。从Facebook在 React Conf 2017 会议上确认,React Fiber 在React 16 版本发布