REFACTOR Simplify save function to return empty fragment

This commit is contained in:
Antoine M 2026-03-25 16:02:30 +01:00
parent 2f6b1f0134
commit 629301a623

View File

@ -1,24 +1,5 @@
/**
* React hook that is used to mark the block wrapper element.
* It provides all the necessary props like the class name.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops
*/
import { useBlockProps } from '@wordpress/block-editor';
import { useBlockProps } from "@wordpress/block-editor";
/**
* The save function defines the way in which the different attributes should
* be combined into the final markup, which is then serialized by the block
* editor into `post_content`.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#save
*
* @return {Element} Element to render.
*/
export default function save() {
return (
<p { ...useBlockProps.save() }>
{ 'Explore Tags hello from the saved content!' }
</p>
);
return <></>;
}