This ends up re-rendering a
, two
- <BreadcrumbList>
, and a
- <ListingTitles>
when it updates. However, none of these have any differences, so we can make this operation significantly cheaper by using
- <SummaryIconRow>
on these three components. This was about as straightforward as changing this:
- React.PureComponent
- export
- default class SummaryIconRow extends React.Component {...
- }
into this:
- export
- default class SummaryIconRow extends React.PureComponent {...
- }
Up next, we can see that
also goes through a re-render on the initial pageload. According to the flame
- <BookIt>
来源: https://juejin.im/entry/5a27849bf265da432d27f8c2