Skip to content
Junaid Bhura edited this page Feb 1, 2019 · 2 revisions

Gumponents Setup

Download and install this plugin. That's it! 🎉

Add Gumponents as a dependency

Make sure to add gumponents as a dependency when you're enqueueing your editor assets:

wp_enqueue_script(
    'your-script',
    plugins_url( 'path/to/blocks.js', __FILE__ ),
    array(
        ...
        'gumponents', // That!
        ...
    ),
);

Add Gumponents to your blocks

Gumponents are available as a global gumponents object to use in your JavaScript, for example:

const { PostRelationshipControl } = gumponents.components;