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.
2
Answers
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.
i finally found the solution and it was supper easy
i just rebuilt Frontend Assets using:
npm run dev