前端题库:
一轮 1.dom react 原理 首先 React 有几个生命周期,在初始的时候依次顺序为 componentWillMount(未来废弃)、componentDidMount; 然后如果外部的传入的 props 发生改变,或者组件内部 state 发生更新,或者 forceUpdate 会触发组件的更新,依次调用 shouldComponentUpdate -> componentWillUpdate -> componentDidUpdate,如果是外部的传入的 props 发生改变导致更新,在此之前还会触发 componentWillReceiveProps; 最后销毁调用 componentWillUnmount 2.css布局 盒子模型 flex 布局