Skip to content

Passing custom props to <InnerBlocks.Content/> #37415

Answered by fabiankaegy
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

@Jonofat Instead of using the <InnerBlocks.Content /> component you can use the useInnerBlockProps.save() hook.

You can see an example of it here: https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/query/save.js

The useInnerBlocksProps hook allows you to pass custom attributes to your components

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@ghost
Comment options

@fabiankaegy
Comment options

@ghost
Comment options

@fabiankaegy
Comment options

@ghost
Comment options

Answer selected by fabiankaegy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
[Feature] Blocks Overall functionality of blocks
1 participant