DEV Community

Discussion on: Seven reasons to learn Vue.js in 2019

Collapse
 
codestuff2 profile image
Adam Whitlock

Great little article. I've been using Vue for an easy way to build reactive WordPress plugins, and I love it. I also just started building a blog with nuxt. The future is looking bright for Vue. Cheers!

Collapse
 
rossta profile image
Ross Kaffenberger

Cool! Using Vue for Wordpress plugins is a use case I hadn't thought of before. Have you written about it or posted code anywhere?

Collapse
 
codestuff2 profile image
Adam Whitlock

I haven't written about it yet, but this is a starter that I forked, and use for wordpress plugins.

github.com/tareq1988/vue-wp-starter

It comes with a pretty bare bones front end and back end app. The front end is based off a short-code so you can throw it anywhere on a site.

I replaced less for sass and a few other things. I'll have to put together a quick tutorial on it here soon.

Thread Thread
 
adamcosi profile image
Adam

Nice one mate, good to see more Vue in WP.

It's a shame React did a back-flip on their license when they realized the world's largest CMS was about to drop it in favor of Vue (the second-contender at the time).

Collapse
 
uidev_simanta profile image
UIdev_Simanta

Is it possible to use wp plugins when using Vue with WordPress? I mean if you use Vue can you install and use wp plugins functionalities if you need any plugin to install for any specific needs?

Collapse
 
codestuff2 profile image
Adam Whitlock

I suppose it depends what you need to do. If you use Vue you can use it to do ajax calls through a rest API endpoint you set up with WordPress and php. Then you can do database manipulation, call other WordPress plugs or basically do anything else through this API. Vue essentially is just front end so you still need to wire it up to the back end somehow

Thread Thread
 
uidev_simanta profile image
UIdev_Simanta

How can I change frontend without vue? Is there any other options

Thread Thread
 
codestuff2 profile image
Adam Whitlock

In wordpress everything is ran server side with PHP, and you can use php to write template files, and markup very easily. There are also other libraries like handlebars you could use to render templates from data as well. Just depends on what you are familiar with and what kind of data you are displaying.