qubitsky / fe-review Goto Github PK
View Code? Open in Web Editor NEW关于我所知道的前端知识梳理与回顾
关于我所知道的前端知识梳理与回顾
起因:
项目使用 react-flip-number 来做数字滚动动画,然后在 iphone6s ios10.1.1 上数字动画过程中,部分数字无法显示,动画停止后,才显示出来。
解决:
window.onpageshow = function(e) {
if (e.persisit) {
window.location.reload();
}
}
浏览器加载页面是从加载一个html文档开始的
接下来发生了啥?
let foo = 'foo';
const bar = 'bar';
上述代码中,foo
会被推断为string
类型,bar
会被推断为'bar'
类型
const obj = {
foo: 'foo',
bar: 'bar'
}
上述代码中,obj
的类型会被推断为
const obj: {
foo: string;
bar: string;
}
如果我们需要保留字面量值为它的类型呢?
这篇文章有讨论这个问题:Tuple与字面量类型的保留
在文章评论区发现了一个很好的解决办法:as const
它是 [email protected] 新增的一个特性:const assertions
向一位从未接触过,但是感兴趣的学员介绍前端是什么
可以从以下几个方面:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.