Is there a way to get the current block id? I would like to add it in the html generated in the save function (registerBlockType).
The save portion of my block:
save: props => {
const {
attributes: { images, isCropped },
className,
} = props;
return (
<div className={ `${className} ${isCropped ? 'is-cropped' : ''}` }>
<div className={`grid`}>
{ images.map( img => (
<div className={ `grid-item` }
<img src={ img.src } />
</div>
))}
</div>
</div>
);
}
Thx!