Contoh Kode Menggunakan Blok Dalam di WordPress dengan EsNext

import { registerBlockType } from '@wordpress/blocks';
import { InnerBlocks, useBlockProps } from '@wordpress/block-editor';
 
registerBlockType( 'softhunt/inner-example', {
    // ...
 
    edit: () => {
        const blockProps = useBlockProps();
 
        return (
            <div { ...blockProps }>
                <InnerBlocks />
            </div>
        );
    },
 
    save: () => {
        const blockProps = useBlockProps.save();
 
        return (
            <div { ...blockProps }>
                <InnerBlocks.Content />
            </div>
        );
    },
} );
Outrageous Ostrich