1面
react系列
- react获取真实DOM是在哪一个阶段?卸载组件在哪个周期?
redux的触发流程,什么情况下触发dispatch,action?组件和redux用什么方法连接(connect)?
工作流程:
1.用户发出actionstore.dispatch(action)
2.Store调用Reducer,传入 当前State和接收的Action,Reducer返回新的State
let nextState=todoApp(previousState,action)
3.State变化,Store执行监听函数
store.subscribe(listener) -》通过store.getState()得到当前的状态 //使用react这时可以重新渲染View function listener(){ let newState=store.getState() component.setState(newState) }
react进入路由前判断是否登录,在哪个阶段判断–>shouldComponentProps
- 无状态组件 没有state的组件
- 验证Props是不是一个方法,比如传过来click是否符合要求
更新组件中一般进行性能优化
git
- 上传步骤
- git pull
- git add -A
- git commit
- 切换分支 git checkout
- 基于线上创建新分支
- 版本回退
ES6
- Promise
- 成功态失败态
- 解构赋值
Sass/Less
- 声明变量的方式 @->Less
- 几个循环
原生
- 面向对象的设计模式
- 工厂模式
- 单例模式
- 构造函数
- 继承
- 指针指向
- 什么时候继承(子类继承父类)
CSS3
- 放大
- animation的参数
(1)animation-name:move 名称
(2)animation-duration:时间
(3)animation-timing-function:ease 运行速度
(4)animation-delay:1S 延迟时间
(5)animation-iteration-count:1|infinite 执行次数
(6)animation-deration:normal | reverse | alternate | alterate-reverse 运行方式
(7)animation-play-state:runing | paused 运行状态
(8)animation-fill-name:none | backwards | both - 平移-》translate
- 过渡-》transition
- transition-prototype 过渡属性
- transition-duration 动画执行时间
- transition-timing-function 动画类型
- transition-delay 延迟时间
Webpack
- 编译Less、Sass用什么?
2面
- 介绍项目,负责什么
- 有几个人
- react和vue有什么区别
- 购物车功能,数量改变寄存在哪里,保存的时间是多久