Skip to content

Commit

Permalink
docs(angular-query): update quick start and readme (#7378)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnoud-dv committed May 4, 2024
1 parent 3ab92bc commit 10bdb08
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/framework/angular/installation.md
Expand Up @@ -3,7 +3,7 @@ id: installation
title: Installation
---

> VERY IMPORTANT: 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.
> IMPORTANT: This library is currently in an experimental stage. This means that breaking changes will happen in minor AND patch releases. Upgrade carefully. If you use this in production while in experimental stage, please lock your version to a patch-level version to avoid unexpected breaking changes.
### NPM

Expand Down
2 changes: 1 addition & 1 deletion docs/framework/angular/overview.md
Expand Up @@ -3,7 +3,7 @@ id: overview
title: Overview
---

> VERY IMPORTANT: 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.
> IMPORTANT: This library is currently in an experimental stage. This means that breaking changes will happen in minor AND patch releases. Upgrade carefully. If you use this in production while in experimental stage, please lock your version to a patch-level version to avoid unexpected breaking changes.
The `@tanstack/angular-query-experimental` package offers a 1st-class API for using TanStack Query via Angular.

Expand Down
20 changes: 19 additions & 1 deletion docs/framework/angular/quick-start.md
Expand Up @@ -3,7 +3,7 @@ id: quick-start
title: Quick Start
---

> VERY IMPORTANT: 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.
> IMPORTANT: This library is currently in an experimental stage. This means that breaking changes will happen in minor AND patch releases. Upgrade carefully. If you use this in production while in experimental stage, please lock your version to a patch-level version to avoid unexpected breaking changes.
[//]: # 'Example'

Expand All @@ -23,6 +23,24 @@ bootstrapApplication(AppComponent, {
})
```

or in a NgModule-based app

```ts
import { provideHttpClient } from '@angular/common/http'
import {
provideAngularQuery,
QueryClient,
} from '@tanstack/angular-query-experimental'

@NgModule({
declarations: [AppComponent],
imports: [BrowserModule],
providers: [provideAngularQuery(new QueryClient())],
bootstrap: [AppComponent],
})
export class AppModule {}
```

### Component with query and mutation

```ts
Expand Down
21 changes: 19 additions & 2 deletions packages/angular-query-experimental/README.md
Expand Up @@ -7,13 +7,13 @@

# Angular Query

> 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.
> IMPORTANT: This library is currently in an experimental stage. This means that breaking changes will happen in minor AND patch releases. Upgrade carefully. If you use this in production while in experimental stage, please lock your version to a patch-level version to avoid unexpected breaking changes.
Functions for fetching, caching and updating asynchronous data in Angular

# Documentation

Visit https://tanstack.com/query/latest/docs/angular/overview
Visit https://tanstack.com/query/latest/docs/framework/angular/overview

## Quick Features

Expand Down Expand Up @@ -54,6 +54,23 @@ Visit https://tanstack.com/query/latest/docs/angular/overview
})
```

or in a NgModule-based app

```ts
import { provideHttpClient } from '@angular/common/http'
import {
provideAngularQuery,
QueryClient,
} from '@tanstack/angular-query-experimental'

@NgModule({
declarations: [AppComponent],
imports: [BrowserModule],
providers: [provideAngularQuery(new QueryClient())],
bootstrap: [AppComponent],
})
```

3. Inject query

```ts
Expand Down

0 comments on commit 10bdb08

Please sign in to comment.