project-gutenberg

How can I access the values of an inner block in Gutenberg?

☆樱花仙子☆ 提交于 2021-01-29 03:11:39
问题 I'm trying to build a custom block for Gutenberb. It is a carousel and uses child blocks (images). I'm trying to find a way to find out how many image-blocks were created inside to block so I can create slides for the carousel accordingly. In order to do that, I was thinking about taking the image url from each image block and store it in an array so then I can just map through the array to create each slide, but I have no idea how to access the url value from the child block. Any ideas? 回答1: