How to pass the parent attributes or to pass some props in the inner child block?
<InnerBlocks allowedBlocks={[ 'groupama-blocks/block-08']}/>
For example I’d like to add this block attributes to block 08 that I will add as a inner block.
How to pass the parent attributes or to pass some props in the inner child block?
<InnerBlocks allowedBlocks={[ 'groupama-blocks/block-08']}/>
For example I’d like to add this block attributes to block 08 that I will add as a inner block.
2
Answers
PASSING DATA FROM PARENT TO CHILD GUTENBERG
PARENT
CHILD
Block context is a WordPress feature used in "registerBlockType", which allows ancestor blocks to provide values to descendant blocks.
https://developer.wordpress.org/block-editor/reference-guides/block-api/block-context/