Rendering of Macro Body in Forge Confluence Macro

Hi there,

I am new to Forge and I am writing my first macro that allows me to hide or show the contents in its body dependent on the value of a hide parameter.

It basically works and there is no problem when the page is first rendered after its update. But on subsequent reloads of the page, the macro body’s content is shown shortly on the page before the code of the macro is called to hide it.

I am using UI Kit (render: native and layout: bodied) and I do not see how I can prevent the body to be shown first.

What am I missing?

Cheers,
Robert