Skip to content

Commit

Permalink
docs: Fix vote demo highlight lines
Browse files Browse the repository at this point in the history
  • Loading branch information
ntucker committed Jul 26, 2024
1 parent 5a3287e commit dbe7cfa
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
10 changes: 5 additions & 5 deletions docs/core/api/Manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ ensure they can consume a promise. Conversely, redux middleware must be changed
Middlewares will intercept actions that are dispatched and then potentially dispatch their own actions as well.
To read more about middlewares, see the [redux documentation](https://redux.js.org/advanced/middleware).

### cleanup()

Provides any cleanup of dangling resources after manager is no longer in use.

### init()
### init(state)

Called with initial state after provider is mounted. Can be useful to run setup at start that
relies on state actually existing.

### cleanup()

Provides any cleanup of dangling resources after manager is no longer in use.

## Adding managers to Reactive Data Client {#adding}

Use the [managers](../api/DataProvider.md#managers) prop of [DataProvider](../api/DataProvider.md). Be
Expand Down
6 changes: 5 additions & 1 deletion docs/core/concepts/managers.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ import StackBlitz from '@site/src/components/StackBlitz';

# Managers and Middleware

<!-- global useEffect - centralized orchestration (talk about the problem we're solving - global side effects) -->

<!-- controller.set -> dispatch(createSet()) -> DevToolsManager -> NetworkManager -> SubManager -> reducer -> state -->

Reactive Data Client uses the [flux store](https://facebookarchive.github.io/flux/docs/in-depth-overview/) pattern, which is
characterized by an easy to [understand and debug](../getting-started/debugging.md) the store's [undirectional data flow](<https://en.wikipedia.org/wiki/Unidirectional_Data_Flow_(computer_science)>). State updates are performed by a [reducer function](https://github.com/reactive/data-client/blob/master/packages/core/src/state/reducer/createReducer.ts#L19).

Expand Down Expand Up @@ -117,4 +121,4 @@ directly with `event.data`.

### Coin App

<StackBlitz app="coin-app" file="src/getManagers.tsx,src/resources/Ticker.ts,src/pages/AssetDetail/AssetPrice.tsx,src/resources/StreamManager.ts" height="600" />
<StackBlitz app="coin-app" file="src/getManagers.ts,src/resources/Ticker.ts,src/pages/AssetDetail/AssetPrice.tsx,src/resources/StreamManager.ts" height="600" />
2 changes: 1 addition & 1 deletion docs/core/shared/_VoteDemo.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class Post extends Entity {
}
```

```ts title="PostResource" {14-21}
```ts title="PostResource" {15-22}
import { resource } from '@data-client/rest';
import { Post } from './Post';

Expand Down
2 changes: 1 addition & 1 deletion examples/benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Performance compared to normalizr package (higher is better):

| | no cache | with cache |
| ------------------- | -------- | ---------- |
| normalize (long) | 119% | 119% |
| normalize (long) | 121% | 121% |
| denormalize (long) | 158% | 1,262% |
| denormalize (short) | 676% | 2,367% |

Expand Down

0 comments on commit dbe7cfa

Please sign in to comment.