Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

网易互娱 #36

Open
Amybiubiu opened this issue Apr 26, 2021 · 1 comment
Open

网易互娱 #36

Amybiubiu opened this issue Apr 26, 2021 · 1 comment
Labels

Comments

@Amybiubiu
Copy link
Owner

Amybiubiu commented Apr 26, 2021

一面 这一面的时间还比较短 30min

  • 自我介绍
  • 跨域的方式
  • http 缓存
  • 侧边栏(可收起)和主内容自适应布局,用 BFC 触发??(我现在问 css 必死???
  • react 生命周期
  • react 虚拟 dom,你知道虚拟 dom 它的结构吗?
  • setState 之后 this.state 获取到最新的值(好久之前的事了。。。可以用 setTimeOut 。
  • 反问(面试官所在的部门是直播平台相关的)

二面 过去几天了,记我没答上的。 “双打”

  • 一个有1000 item 的列表,想要点赞怎样事件绑定?
    我说了用事件委托,他问为什么用事件委托,事件委托有什么优点?
  • 打乱数组算法
  • 优雅的去重算法
@Amybiubiu Amybiubiu changed the title 网易互娱 一面 网易互娱 Apr 26, 2021
@Amybiubiu
Copy link
Owner Author

Amybiubiu commented May 23, 2021

// 零界点逻辑
const innerHeight = window.innerHeight
const { top, bottom } = fragment.getBoundingClientRect()

if (bottom <= innerHeight) {
  // 到达最后一个Item,向下
}

if (top >= 0) {
  // 到达第一个Item,向上
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant