BlockTitle: avoid re-render on attributes change#32118
BlockTitle: avoid re-render on attributes change#32118
Conversation
|
Size Change: -38 B (0%) Total Size: 1.86 MB
ℹ️ View Unchanged
|
|
@ramonjd, I think some of these optimizations could apply to the new |
Thanks for the ping. It definitely makes sense to encapsulate some of that logic in the selector. And it looks neater. :) I've started it off over at https://github.com/WordPress/gutenberg/pull/40004/files The tests will have to be refactored significantly to cover the logic as well. I'd be interested to know if it's something that is causing issues. I guess not since the PR description doesn't mention it. I've done a small comparison using Flamegraph and the visual render tool, and I can't see where we're triggering Block Title re-renders in trunk and with the changes. |

Description
Just a small optimisation. The block attributes object should not be returned by the selector.
How has this been tested?
Screenshots
Types of changes
Checklist:
*.native.jsfiles for terms that need renaming or removal).