You can map remote data directly into your Vue.js templates using RxJS. This lesson uses axios (and the vue-axios library which exposes axios on components as this.$http
) and wraps the remote call inside of an Observable to provide the data into the template
Import it via => import {from } from 'rxjs';
Then use it directly
This is fantastic.
Import it via => import {from } from 'rxjs';
Then use it directly
Also, in order to use pluck without getting an error using Vue 2, I also imported:
import { pluck } from 'rxjs/operators';
then used it via .pipe( pluck('data', 'name') )