Notes for Concurrent Rendering in React - Andrew Clark and Brian Vaughn - React Conf 2018
Code-splitting components with lazy()
import {lazy} from 'react'
const Chart = lazy(() => import('./Chart'))
// in the render part, use `Chart` as normal
render(){
return (
<div>
// .....
转载
2019-01-29 20:53:58 ·
215 阅读 ·
0 评论