How to store arrays as attributes when building gutenberg blocks in WordPress

In this video we’ll show you how to store arrays as attributes. This will super-power your block building and save you from having to create a bunch of extra attributes. Think of adding padding attributes to a block in Gutenberg. You’d have to 4 attributes to pull this off, one for the top, bottom, left and right. Well those days are gone, now you can store those values in an array using the array.map method.

Leave a Reply

Your email address will not be published. Required fields are marked *