16
Wombat
7y

After doing some Vue, I probably will go with laravel for the backend.

I'm excited about that, but it feels just right.

Comments
  • 1
    @AlexDeLarge if you don't mind me asking, I have setup vue-router and all is good. But if I reload the page, created, mounted ...etc do not get called, any idea why? It is not related to Vue router just thought I'd mention it
  • 1
    @AlexDeLarge No worries man :D
  • 1
    Used Vuejs for our latest project at work with a Rails API, it was pretty fun, i found Vue to be nice to develop with.

    Have yet to try it within a rails app, to see if it's going well with it
  • 3
    @gitpush Instead of go use push it pushes the component on top of stack and created and mounted life cycle hooks would work.

    I found this problem in my ajax queries hope it helps.
  • 1
    @over9000 Thats what I use: Router.push({ name: "folderInfo", params: { folderId: folder.id, Folder: folder } }); (link: https://github.com/gitpushdev/...)

    The issue is when I hit F5 to refresh the page mounted/created ...etc does not get called :\
  • 2
    @gitpush Dumb question, in what vue-router mode are you ? # or history ? Dunno if it could have an impact, i've never encountered this error.
  • 1
    @Gloumy I did not have a mode, then I made it history if you are referring to this: https://github.com/gitpushdev/...

    export default new VueRouter({

    mode: 'history',

    routes: routes

    })
  • 2
    @gitpush Yeah that's what i was referring.

    I really have no idea what would cause the lifecycle hooks to not be called, that's strange
  • 1
    @Gloumy Component is being mounted but it is not calling, could it be FireFox is fetching it from cache? Even though I did press CTRL + F5 which should fetch a fresh copy
  • 2
    @gitpush Not sure cache could be a problem in dev environment, at least i don't remember having problems with it.

    I assume you put a simple console.log that isn't being called in your mounted() ?
  • 1
    @Gloumy yup and after that console.log I fetch from the server and my service is not printing any received request either :/
  • 2
    @gitpush Can't find any reason about that, sorry
  • 2
    @Gloumy no worries man, thanks for your help 😀
  • 3
    @gitpush yep I face same issue it logs to console but does not fulfill the ajax calls.
  • 1
    @over9000 I wish it logs to console 😭
  • 2
    Laravel comes together with Vue and yes they are indeed a good couple 😊
  • 2
    @gitpush Are the lifecycle hooks called if you change routes? So they are only not called on a fresh load?
  • 1
    @ChibangLW yes they are called when I navigate and not called when I reload the page
Add Comment