What could cause component to run twice?

This is happening very often in my projects.
I have a simple layout, a page with a component.
and the component is instanciated and run twice.

With a simple tracelog in the onRun() method shows that behavior.

What could possiblily go wrong?

I have only one component dropped in the page, no additional component through php code, no component on the layout.

very weird, isn’t it?

1 Like

Just did some tests - using v3.5.9

If my component [component1] is added to a page or layout, the function onRun() or onRender() will run once.

To make it run twice, I had to put [component1] in the layout AND the page.

It’s happening for you in differents projects, which i’m not sure why.

thanks @apinard for your feedback

Is it because I am using Laravel Valet maybe?

If I add the component to the layout and the page, it runs 4 times :crazy_face:

Aaaaah! would it be the effect of using TURBO maybe?

I removed it, but does not seems to be the issue here