Does deep nesting flexbox layout cause performance issue?

前端 未结 2 1265
清歌不尽
清歌不尽 2021-02-12 20:17

I have been working on a ReactJS project where I create most of the components using flexbox layout. Since with react, we can have deeply nested components, so my layout is havi

2条回答
  •  终归单人心
    2021-02-12 20:50

    Old flexbox (display: box) is 2.3x slower than new flexbox (display: flex). Regular block layout (non-float), will usually be as fast or faster than new flexbox since it’s always single-pass. But new flexbox should be faster than using tables or writing custom JS-base layout code. For more info Article1 Article2

提交回复
热议问题