Block Editor: Rename block context in BlockListBlock#21922
Conversation
|
Size Change: 0 B Total Size: 816 kB ℹ️ View Unchanged
|
|
I think the consumer usage needs to be updated, since we changed the exported name. |
|
I don’t know how I missed this export 😅 |
It seemed strange to me that we were changing a provider name, and there were no changes for consumers 😛 |
77e876f to
286281c
Compare
|
Unrelated to this PR but I've been thinking about whether we really need this context at all since both these two components (provider and consumer) are internal components that have access to clientID so they can figure out all this data inline. Also wondering if all these properties are used in both or just in the wrapper (so just move them there) |
It's an interesting point. I'm not aware of the background here. I could see how the provider could be useful in that these values are "already available" at the top-level block, so passing the value down through context could avoid needing to select them a second time. But in practice, I'm not sure how much value we get from this, since the memoization itself would have some overhead ( |
aduth
left a comment
There was a problem hiding this comment.
Despite conversation above, the changes do satisfy the needs of the issue.
|
@youknowriad, as soon as it’s confirmed that we can skip using the context here, I’m happy to open another PR. |
Description
Fixes #21664.