Search code examples
reactjslaravelbreeze

Laravel breeze react app, changing AuthenticatedLayout does not take effect


I just created a new Laravel app with breeze and react to learn something new. I am just trying to figure out how React works.

I was going through the files and tried changing stuff so I see the consequences, let's say.

The issue is - whenever I change anything in the AuthenticatedLayout.tsx default file, nothing happens. I can literally delete all the content inside this file and it does not have any effect.

Changing text or elements inside Dashboard.tsx works as expected.

I thought it was some kind of cache issue, but since the files that utilize the Layout do change, I am very confused.

Nevertheless I tried deleting cache, different browsers, restarting the entire thing, nothing helped

There was no configuration added - everything is default from the commands in the docs.


Solution

  • After multiple hours of struggling, I found a solution - which is very simple as I thought.

    Breeze when configured with TypeScript creates not only .tsx files but also .jsx files with the same name -> and in PhpStorm, these files were hidden under the .tsx file with an arrow next to it (just as a folder would be).

    The changes were not taking effect, because I only edited the .tsx files, but the .jsx files were prioritized.

    Deleting all the .jsx files resolved the issue.