Search code examples
reactjslaravellaravel-artisan

blade view not updated


I am new to Laravel and react,I have some issues with JS files,I made some change in app.js(rename "Example" to "Examplee") but this is not rendering in the browser(incognito) . I have cleared session and and config cache ,I deleted views cache too but didn't help.

root@ubuntu-s-1vcpu-1gb-nyc3-01:/var/www/html/laratweet/resources/js# more app.js

First we will load all of this project's JavaScript dependencies which includes React and other helpers. It's a great starting point while building robust, powerful web applications using React + Laravel.

require('./bootstrap');

Next, we will create a fresh React component instance and attach it to the page. Then, you may begin adding components to this application or customize the JavaScript scaffolding to fit your unique needs.

 require('./components/Examplee');

Any idea why the JS update is not updated in the browser?

php artisan --version

Laravel Framework 6.14.0


Solution

  • You need to compile the changes when up update your resources files.

    npm run dev

    See: https://laravel.com/docs/6.x/mix for full details on other commands.