Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
@tanstack/angular-query-experimental
Advanced tools
Readme
This library is currently in an experimental stage. This means that breaking changes will happen in minor AND patch releases. Use at your own risk. If you choose to rely on this in production in an experimental stage, please lock your version to a patch-level version to avoid unexpected breakages.
Functions for fetching, caching and updating asynchronous data in Angular
Visit https://tanstack.com/query/latest/docs/angular/overview
Angular Query requires Angular 16.
Install angular-query
$ npm i @tanstack/angular-query-experimental
# or
$ pnpm add @tanstack/angular-query-experimental
# or
$ yarn add @tanstack/angular-query-experimental
# or
$ bun add @tanstack/angular-query-experimental
Initialize Angular Query by adding provideAngularQuery to your application
import { provideAngularQuery } from '@tanstack/angular-query-experimental'
import { QueryClient } from '@tanstack/angular-query-experimental'
bootstrapApplication(AppComponent, {
providers: [provideAngularQuery(new QueryClient())],
})
Inject query
import { injectQuery } from '@tanstack/angular-query-experimental'
import { Component } from '@angular/core'
@Component({...})
export class TodosComponent {
info = injectQuery(() => ({ queryKey: ['todos'], queryFn: fetchTodoList }))
}
If you need to update options on your query dynamically, make sure to pass them as signals
import { injectQuery } from '@tanstack/angular-query-experimental'
import { signal, Component } from '@angular/core'
@Component({...})
export class TodosComponent {
id = signal(1)
enabled = signal(false)
info = injectQuery(() => ({
queryKey: ['todos', this.id()],
queryFn: fetchTodoList,
enabled: this.enabled(),
}))
}
FAQs
Signals for managing, caching and syncing asynchronous and remote data in Angular
The npm package @tanstack/angular-query-experimental receives a total of 2,643 weekly downloads. As such, @tanstack/angular-query-experimental popularity was classified as popular.
We found that @tanstack/angular-query-experimental demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.