- Memoizing textParts will prevent their parent Text from rerendering when unnecessary
- Wrapping the whole component with React.memo brings it back to parity with the old PureComponent implementation
Details
Details
- Reviewers
atul - Commits
- rCOMM2d527cea677d: [native] Add some memoization to InnerRobotextMessage
Flow, making sure robotext messages still render on native
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
native/chat/inner-robotext-message.react.js | ||
---|---|---|
152–159 ↗ | (On Diff #21799) | (I loosely remember something about exporting multiple things from a file with a React component could lead to issues with hot reloading or something?) |
native/chat/inner-robotext-message.react.js | ||
---|---|---|
152–159 ↗ | (On Diff #21799) | Ah gotcha, thanks for clarifying + linking to that |