How To Access Block Directory Inside Gutenberg Block.js File?

Sometimes, we need to access the block directory url inside Gutenberg block.js file (see following scenario). Let’s say that inside the block folder you have an images folder containing logo.png image and you want to access that image inside the block.js file. In this blog post we will learn how to access the image inside images folder from block.js file.

forward

Create Gutenberg Template Using Inner Blocks

In previous blog posts, we have learned how to create custom Gutenberg blocks. In this tutorial we will learn how to create Gutenberg template with pre-defined blocks using inner blocks component.

forward