JavaScript for WordPress Forums Gutenberg Development Creating reusable components Reply To: Creating reusable components

Zac Gordon

Aw, missed this at first glance. Simple solution 🙂

You’re defining the component inside your edit function.

It’s best to pull it out into its own file or at least up outside of the registerBlockType function 🙂

Let me know if that doesn’t work!