A proposal to introduce getBlockIcon and getBlockTitle selectors for the Blocks store.
const icon = getBlockIcon( blockName, attributes );
const title = getBlockTitle( blockName, attributes );
Why
These values are crucial to the Block's identity and accessibility. They are fetched and rendered repeatedly throughout the editors. So, they should be easily accessible via selectors instead of relying on custom hooks.
cc @WordPress/gutenberg-core
A proposal to introduce
getBlockIconandgetBlockTitleselectors for the Blocks store.Why
These values are crucial to the Block's identity and accessibility. They are fetched and rendered repeatedly throughout the editors. So, they should be easily accessible via selectors instead of relying on custom hooks.
cc @WordPress/gutenberg-core