Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Register more than one blocks #36

Open
Shamim-Aktar opened this issue Apr 1, 2020 · 0 comments
Open

Register more than one blocks #36

Shamim-Aktar opened this issue Apr 1, 2020 · 0 comments

Comments

@Shamim-Aktar
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant