Rest API and Vuejs

(Alessandro Tesoro) #1

Hey everyone, I’ve recently started rebuilding a plugin of a mine and I’ve got few doubts. Prior to this I’ve never really used the rest api combined with vuejs.

Is the REST API faster than using ajax?

Also, in my case, some parts of the frontend of the plugin will be using vuejs. My plugins supports “templates” so that users can customize them either through themes or through hooks. So using vuejs entirely for the frontend isn’t possible, otherwise they wouldn’t be able to “hook into” the templates. So I was thinking of using the rest api with vuejs to retrieve the output of the template file and then display it on the frontend. ( They are forms basically ). Any best practises to do this? Or is there anything I need to be specifically careful with?

Thank you :slight_smile: