is this compatible with Vue ? #128

Closed
opened 2018-02-19 19:40:56 -05:00 by vesper8 · 2 comments
vesper8 commented 2018-02-19 19:40:56 -05:00 (Migrated from github.com)

I've been using Vue with Turbolinks and this requires me to use

https://github.com/frenzyapp/turbolinks (to handle server responses with Laravel)
https://github.com/jeffreyguenther/vue-turbolinks (to make it play friendly with Vue itself)

But I'm not happy with it, or rather I can't get it to work properly.. so now I'm looking to try Pjax instead

And I would prefer to use this library instead of the original https://github.com/defunkt/jquery-pjax, because this one is actively developed and offers some advantages over the other

However it's not clear if this will work with my Vue/Laravel stack

An article on Medium suggested that to use Pjax you'd need to use
https://github.com/spatie/vue-pjax (to handle server responses with laravel)
https://github.com/riverskies/vue-pjax-adapter (to make it play friendly with Vue itself)

But this readme suggests that nothing needs to be done on the server side and Vue isn't mentioned anywhere.

So I would like to know, if anyone knows.. will this work?

Thanks!!

I've been using Vue with Turbolinks and this requires me to use https://github.com/frenzyapp/turbolinks (to handle server responses with Laravel) https://github.com/jeffreyguenther/vue-turbolinks (to make it play friendly with Vue itself) But I'm not happy with it, or rather I can't get it to work properly.. so now I'm looking to try Pjax instead And I would prefer to use this library instead of the original https://github.com/defunkt/jquery-pjax, because this one is actively developed and offers some advantages over the other However it's not clear if this will work with my Vue/Laravel stack An article on Medium suggested that to use Pjax you'd need to use https://github.com/spatie/vue-pjax (to handle server responses with laravel) https://github.com/riverskies/vue-pjax-adapter (to make it play friendly with Vue itself) But this readme suggests that nothing needs to be done on the server side and Vue isn't mentioned anywhere. So I would like to know, if anyone knows.. will this work? Thanks!!
BehindTheMath commented 2018-02-19 22:58:10 -05:00 (Migrated from github.com)

I don't know much about Vue, but this library was designed to be used without any other rendering / templating library, since it modifies the DOM directly. I'm not sure how that would affect Vue, but I assume that's what the vue-pjax libraries are for, to integrate the responses with Vue.

I don't know much about Vue, but this library was designed to be used without any other rendering / templating library, since it modifies the DOM directly. I'm not sure how that would affect Vue, but I assume that's what the vue-pjax libraries are for, to integrate the responses with Vue.
robinnorth commented 2018-02-21 13:42:59 -05:00 (Migrated from github.com)

@vesper8 sounds like the thing to do is try using Pjax with Vue and see what happens. However, as it does modify the DOM directly, you may well find it conflicts with Vue.

https://github.com/riverskies/vue-pjax-adapter looks like it implements the same/similar functionality to Pjax though, so you could just use that if you are looking for something designed specifically to work with Vue.

@vesper8 sounds like the thing to do is try using Pjax with Vue and see what happens. However, as it does modify the DOM directly, you may well find it conflicts with Vue. https://github.com/riverskies/vue-pjax-adapter looks like it implements the same/similar functionality to Pjax though, so you could just use that if you are looking for something designed specifically to work with Vue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: iLoveElysia/pjax#128