[Vuejs]-Vue-toastr doesn't work when I am using this in inertia.js

0👍

use 

the import Toastr from 'vue-toastr' 

directly on your vue instance not in app.js like this : 

<script>
 import Master from './Layout/Master';
 import Toastr from 'vue-toastr'

  export default{
    name:"Home",
    data()
   {
       return 
          {
            toastr: Toastr
           }
      }
,
    created(){
      this.$toastr.s("success","it is working");
    },
  components:{Master}
  };
</script>

Leave a comment