front / gutenberg-js

JavaScript only version of the WordPress Gutenberg editor (DEPRECATED)
GNU General Public License v2.0
390 stars 42 forks source link

Register more than one blocks #36

Open Shamim-Aktar opened 4 years ago

Shamim-Aktar commented 4 years ago

const currentCategories = select('core/blocks').getCategories().filter(item => item.slug !== category.slug); dispatch('core/blocks').setCategories([ category, ...currentCategories ]);

// Registering the new block registerBlockType(${category.slug}/my-first-block, myFirstBlock);

using this how we can register another block please help