Run function after loading components into gutenberg editor sidebar

I would like to run a function after I load the meta box/components into the sidebar just in the gutenberg editor.

I know I could do it with add_action(‘add_meta_boxes’), but the function I want to run only works in the gutenberg editor. So how do I make this shot on Gutenberg’s JS?

Tried something like below, but doesn’t work.

wp.hooks.addAction('add_meta_boxes', 'cgb/generic-call-block', function () {     console.log(         'after the editor sidebar components have loaded'     ) })