Native fetch but with built-in AbortController
example with composition (maybe you want to implement your own version that also wraps up authorization headers):
import { tracked } from '@glimmer/tracking';import { use, resource } from 'ember-resources';import { remoteData } from 'reactiveweb/remote-data';class Demo { @tracked id = 1; @use myData = resource((hooks) => remoteData(hooks, `https://...${this.id}`) );} Copy
import { tracked } from '@glimmer/tracking';import { use, resource } from 'ember-resources';import { remoteData } from 'reactiveweb/remote-data';class Demo { @tracked id = 1; @use myData = resource((hooks) => remoteData(hooks, `https://...${this.id}`) );}
The same example, but without @use
@use
import { tracked } from '@glimmer/tracking';import { resource } from 'ember-resources';import { remoteData } from 'reactiveweb/remote-data';class Demo { @tracked id = 1; myData = resource(this, (hooks) => remoteData(hooks, `https://...${this.id}`) );} Copy
import { tracked } from '@glimmer/tracking';import { resource } from 'ember-resources';import { remoteData } from 'reactiveweb/remote-data';class Demo { @tracked id = 1; myData = resource(this, (hooks) => remoteData(hooks, `https://...${this.id}`) );}
Generated using TypeDoc
Native fetch but with built-in AbortController
example with composition (maybe you want to implement your own version that also wraps up authorization headers):
The same example, but without
@use