When I set default values in my attributes for my gutenberg blocks, the values can be consumed on the client, but it does not appear in the JSON data until I change the attribute with setAttributes.
Example:
Edit function starts with:
Since we have a headless setup the save function just returns null
.
If I console.log(attributes.infoButtonText)
it will show me ‘I am default’, but without touching it and hitting the save button it is just null
in the JSON.
What am I not understanding?
Thanks!