Skip to content

Commit

Permalink
docs: Improve site metadata for SEO
Browse files Browse the repository at this point in the history
  • Loading branch information
ntucker committed Jun 29, 2024
1 parent 7bd322d commit dc95542
Show file tree
Hide file tree
Showing 43 changed files with 152 additions and 137 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,5 @@ typings/

# build info
**/tsconfig*.tsbuildinfo

/codemods/
5 changes: 3 additions & 2 deletions docs/core/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: The Reactive Data Client
title: Introducing the Reactive Data Client
sidebar_label: Introduction
description: Building delightful dynamic applications with NextJS, Expo, React Native and more.
slug: /
---

Expand All @@ -14,10 +15,10 @@ import HooksPlayground from '@site/src/components/HooksPlayground';
import Link from '@docusaurus/Link';

<head>
<title>Introducing the Reactive Data Client</title>
<meta name="docsearch:pagerank" content="10"/>
</head>

# The Reactive Data Client

Reactive Data Client provides safe and performant [client access](./api/useSuspense.md) and [mutation](./api/Controller.md#fetch) over [remote data protocols](https://www.freecodecamp.org/news/what-is-an-api-in-english-please-b880a3214a82/).
Both pull/fetch ([REST](/rest) and [GraphQL](/graphql)) and push/stream ([WebSockets or Server Sent Events](./api/Manager.md#data-stream)) can be used simultaneously.
Expand Down
7 changes: 5 additions & 2 deletions docs/core/api/AsyncBoundary.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
---
title: '<AsyncBoundary />'
title: AsyncBoundary - Centralize loading and error handling
sidebar_label: <AsyncBoundary />
description: Handles loading and error conditions of Suspense.
---

<head>
<title>AsyncBoundary - Centralize loading and error handling</title>
<meta name="docsearch:pagerank" content="20"/>
</head>

# &lt;AsyncBoundary />

Handles loading and error conditions of Suspense.

In React 18, this will create a [concurrent split](https://react.dev/reference/react/useTransition), and in 16 and 17 it will show loading fallbacks. If there is an irrecoverable error, it will show an error fallback.
Expand Down
6 changes: 4 additions & 2 deletions docs/core/api/Controller.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Controller
title: Controller - Typesafe imperative store access
sidebar_label: Controller
---

<head>
<title>Controller - Typesafe imperative store access</title>
<meta name="docsearch:pagerank" content="30"/>
</head>

Expand All @@ -12,6 +12,8 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import StackBlitz from '@site/src/components/StackBlitz';

# Controller

`Controller` is a singleton providing safe access to the Reactive Data Client [flux store and lifecycle](./Manager.md#control-flow).
`Controller` memoizes all store access, allowing a global referential equality guarantee and the fastest rendering
and retrieval performance.
Expand Down
10 changes: 5 additions & 5 deletions docs/core/api/DataProvider.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
title: '<DataProvider />'
title: DataProvider - Normalized async data management in React
sidebar_label: <DataProvider />
description: High performance, globally consistent data management in React
---

<head>
<title>DataProvider - Normalized async data management in React</title>
</head>

import Installation from '../shared/\_installation.mdx';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# &lt;DataProvider />

Manages state, providing all context needed to use the hooks. Should be placed as high as possible
in application tree as any usage of the hooks is only possible for components below the provider
in the React tree.
Expand Down
9 changes: 4 additions & 5 deletions docs/core/api/Fixtures.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
---
title: Fixtures and Interceptors
title: Fixtures and Interceptors: declarative data mocking for tests and stories
sidebar_label: Fixtures and Interceptors
description: Fixtures and Interceptors allow universal data mocking without the need for monkeypatching fetch behaviors.
---

<head>
<title>Fixtures and Interceptors: declarative data mocking for tests and stories</title>
</head>

import GenericsTabs from '@site/src/components/GenericsTabs';

# Fixtures and Interceptors

Fixtures and Interceptors allow universal data mocking without the need for monkeypatching
fetch behaviors. Fixtures define static responses to specific endpoint arg combinations. This
allows them to be used in static contexts like [mockInitialState()](./mockInitialState.md).
Expand Down
6 changes: 2 additions & 4 deletions docs/core/api/LogoutManager.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
---
title: 'LogoutManager'
title: LogoutManager - Handling 401s and other deauthorization triggers
sidebar_label: LogoutManager
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import StackBlitz from '@site/src/components/StackBlitz';

<head>
<title>LogoutManager - Handling 401s and other deauthorization triggers</title>
</head>
# LogoutManager

Logs out based on fetch responses. By default this is triggered by [401 (Unauthorized)](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401) status responses.

Expand Down
6 changes: 4 additions & 2 deletions docs/core/api/Manager.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Manager
title: Manager - Powerful middlewares with global store knowledge
sidebar_label: Manager
---

import Tabs from '@theme/Tabs';
Expand All @@ -8,10 +9,11 @@ import ThemedImage from '@theme/ThemedImage';
import useBaseUrl from '@docusaurus/useBaseUrl';

<head>
<title>Manager - Powerful middlewares with global store knowledge</title>
<meta name="docsearch:pagerank" content="20"/>
</head>

# Manager

Managers are singletons that orchestrate the complex asynchronous behavior of `Reactive Data Client`.
Several managers are provided by `Reactive Data Client` and used by default; however there is nothing
stopping other compatible managers to be built that expand the functionality. We encourage
Expand Down
7 changes: 3 additions & 4 deletions docs/core/api/MockResolver.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
title: '<MockResolver />'
title: MockResolver - Data Mocking for React
sidebar_label: <MockResolver />
---

<head>
<title>MockResolver - Data Mocking for React</title>
</head>
# &lt;MockResolver />

```typescript
function MockResolver<T>(props: {
Expand Down
7 changes: 2 additions & 5 deletions docs/core/api/NetworkManager.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
---
title: NetworkManager
title: NetworkManager - Orchestrating efficient race-condition free fetching
sidebar_label: NetworkManager
---

<head>
<title>NetworkManager - Orchestrating efficient race-condition free fetching</title>
</head>

# NetworkManager

NetworkManager orchestrates asynchronous fetches. By keeping track of all in-flight requests
it is able to dedupe identical requests if they are made using the throttle flag.
Expand Down
7 changes: 3 additions & 4 deletions docs/core/api/Snapshot.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
title: Snapshot
title: Snapshot - Safe data access with zero race conditions
sidebar_label: Snapshot
---

<head>
<title>Snapshot - Safe data access with zero race conditions</title>
</head>
# Snapshot

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
Expand Down
10 changes: 5 additions & 5 deletions docs/core/api/useCache.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
title: useCache()
title: useCache() - Normalized data store access in React
sidebar_label: useCache()
description: Data rendering without the fetch. Access any Endpoint's response.
---

<head>
<title>useCache() - Normalized data store access in React</title>
</head>

import GenericsTabs from '@site/src/components/GenericsTabs';
import ConditionalDependencies from '../shared/\_conditional_dependencies.mdx';
import HooksPlayground from '@site/src/components/HooksPlayground';
import StackBlitz from '@site/src/components/StackBlitz';
import { RestEndpoint } from '@data-client/rest';

# useCache()

Data rendering without the fetch.

Access any [Endpoint](/rest/api/Endpoint)'s response. If the response does not exist, returns
Expand Down
8 changes: 4 additions & 4 deletions docs/core/api/useCancelling.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: useCancelling()
title: useCancelling() - Declarative fetch aborting for React
sidebar_label: useCancelling()
description: Builds an Endpoint that cancels fetch everytime parameters change. Aborts inflight request on param change.
---

import HooksPlayground from '@site/src/components/HooksPlayground';
import PkgInstall from '@site/src/components/PkgInstall';
import UseCancelling from '../shared/\_useCancelling.mdx';

<head>
<title>useCancelling() - Declarative fetch aborting for React</title>
</head>
# useCancelling()

Builds an Endpoint that cancels fetch everytime parameters change

Expand Down
7 changes: 5 additions & 2 deletions docs/core/api/useController.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
---
title: useController()
title: useController() - Type safe store manipulation in React
sidebar_label: useController()
description: Controller provides type-safe methods to access and dispatch actions to the store.
---

<head>
<title>useController() - Type safe store manipulation in React</title>
<meta name="docsearch:pagerank" content="10"/>
</head>

import TypeScriptEditor from '@site/src/components/TypeScriptEditor';
import StackBlitz from '@site/src/components/StackBlitz';

# useController()

[Controller](./Controller.md) provides type-safe methods to access and dispatch actions to the store.

For instance [fetch](./Controller.md#fetch), [invalidate](./Controller.md#invalidate),
Expand Down
7 changes: 3 additions & 4 deletions docs/core/api/useDLE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: useDLE() - [D]ata [L]oading [E]rror
title: useDLE() - [D]ata [L]oading [E]rror React State
sidebar_label: useDLE()
description: High performance async data rendering without overfetching. With fetch meta data.
---

import HooksPlayground from '@site/src/components/HooksPlayground';
Expand All @@ -12,9 +13,7 @@ import ConditionalDependencies from '../shared/\_conditional_dependencies.mdx';
import TypeScriptEditor from '@site/src/components/TypeScriptEditor';
import StackBlitz from '@site/src/components/StackBlitz';

<head>
<title>useDLE() - [D]ata [L]oading [E]rror React State</title>
</head>
# useDLE() - [D]ata [L]oading [E]rror

High performance async data rendering without overfetching. With fetch meta data.

Expand Down
8 changes: 4 additions & 4 deletions docs/core/api/useDebounce.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: useDebounce()
title: useDebounce() - Declarative value delays for React
sidebar_label: useDebounce()
description: Delays updating the parameters by debouncing. Avoid excessive network requests due to quick parameter changes like typeaheads.
---

import PkgInstall from '@site/src/components/PkgInstall';
import HooksPlayground from '@site/src/components/HooksPlayground';

<head>
<title>useDebounce() - Declarative value delays for React</title>
</head>
# useDebounce()

Delays updating the parameters by [debouncing](https://css-tricks.com/debouncing-throttling-explained-examples/).

Expand Down
7 changes: 3 additions & 4 deletions docs/core/api/useError.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
title: useError()
title: useError() - Accessing error metadata
sidebar_label: useError()
---

<head>
<title>useError() - Accessing error metadata</title>
</head>
# useError()

```typescript
export interface SyntheticError extends Error {
Expand Down
7 changes: 5 additions & 2 deletions docs/core/api/useFetch.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
---
title: useFetch()
title: useFetch() - Declarative fetch triggers for React
sidebar_label: useFetch()
description: Fetch without the data rendering. Prevent fetch waterfalls by prefetching without duplicate requests.
---

import GenericsTabs from '@site/src/components/GenericsTabs';
import ConditionalDependencies from '../shared/\_conditional_dependencies.mdx';

<head>
<title>useFetch() - Declarative fetch triggers for React</title>
<meta name="docsearch:pagerank" content="10"/>
</head>

# useFetch()

Fetch without the data rendering.

This can be useful for ensuring resources early in a render tree before they are needed.
Expand Down
7 changes: 5 additions & 2 deletions docs/core/api/useLive.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
title: useLive()
title: useLive() - Rendering dynamic data in React
sidebar_label: useLive()
description: Async rendering of remotely triggered data mutations. useSuspense() + useSubscription() in one hook.
---

<head>
<title>useLive() - Rendering dynamic data in React</title>
<meta name="docsearch:pagerank" content="10"/>
</head>

Expand All @@ -14,6 +15,8 @@ import {RestEndpoint} from '@data-client/rest';
import StackBlitz from '@site/src/components/StackBlitz';
import UseLive from '../shared/\_useLive.mdx';

# useLive()

Async rendering of remotely triggered data mutations.

[useSuspense()](./useSuspense.md) + [useSubscription()](./useSubscription.md) in one hook.
Expand Down
8 changes: 4 additions & 4 deletions docs/core/api/useLoading.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: useLoading()
title: useLoading() - Turn any promise into React State
sidebar_label: useLoading()
description: Track loading and error state of any async function.
---

import UseLoading from '../shared/\_useLoading.mdx';
import PkgInstall from '@site/src/components/PkgInstall';
import StackBlitz from '@site/src/components/StackBlitz';

<head>
<title>useLoading() - Turn any promise into React State</title>
</head>
# useLoading()

Helps track loading state of imperative async functions.

Expand Down
10 changes: 5 additions & 5 deletions docs/core/api/useQuery.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
title: useQuery()
title: useQuery() - Normalized data store access in React
sidebar_label: useQuery()
description: Data rendering without the fetch. Access any Schema's memoized store value.
---

<head>
<title>useQuery() - Normalized data store access in React</title>
</head>

import GenericsTabs from '@site/src/components/GenericsTabs';
import ConditionalDependencies from '../shared/\_conditional_dependencies.mdx';
import HooksPlayground from '@site/src/components/HooksPlayground';
import StackBlitz from '@site/src/components/StackBlitz';
import { RestEndpoint } from '@data-client/rest';
import VoteDemo from '../shared/\_VoteDemo.mdx';

# useQuery()

Query the store.

Renders any [Queryable Schema](/rest/api/schema#queryable) like [Entity](/rest/api/Entity), [All](/rest/api/All), [Collection](/rest/api/Collection), [Query](/rest/api/Query),
Expand Down
Loading

0 comments on commit dc95542

Please sign in to comment.