I developed a custom slider block, and i'd like to add an action to the wp_head in the callback render function.
Obviously it's not working using add_action('wp_head', .... )
because the render callback function is called after the wp_head hook is parsed and rendered.
Well... that's what i'm thinking.
How can i add something in the head dinamically, like a <link rel="preload" src="..." />
if there is a video in some field, from the callback render function of a gutenberg block?