Open atachibana opened 3 months ago
Hmm... it is true that in the case of data-wp-each
, saying what it generates is not clear because what it generates on the server is not exactly what it generates on the client after processing. As you mentioned, the template
tag is removed from the DOM, and the data-wp-each-child
directives are not removed, but are also not produced when new elements are added to the array, as they are only for identifying the elements added on the server.
So, in this case, I am not quite sure what to show without explaining the purpose of data-wp-each-child
.
Description
wp-each
documentation says: https://github.com/WordPress/gutenberg/blob/trunk/docs/reference-guides/interactivity-api/api-reference.mdIt would generate the following output:
But, output includes
data-wp-each-child
. Should we modify above output as followings?Also, the
wp-each-child
section lists the processed results:But, it contains a
<template>
tag that must disappear after the processing. This entire snippet ofwp-each-child
should be removed, and refer to the abovewp-each
output.Step-by-step reproduction instructions
npx @wordpress/create-block@latest my-first-interactive-block --template @wordpress/create-block-interactive-template
render.php
by following code:Screenshots, screen recording, code snippet
No response
Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.