Skip to content

Commit 29a6247

Browse files
rikoejosepot
authored andcommitted
docs: small improvements
- add callout for note in bind - change cautions in tutorials to infos - add links to React and RxJS in tutorials - grammar in core concepts
1 parent a60f427 commit 29a6247

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

docs/api/core/bind.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ function bind<T>(
2626
2. The shared Observable that the hook uses: It also replays back the latest
2727
value emitted. It can be used for composing other streams that depend on it.
2828

29-
Note that bind doesn't propagate completions from the source stream - The shared
29+
:::note
30+
`bind` doesn't propagate completions from the source stream - the shared
3031
subscription is closed as soon as there are no subscribers to that Observable.
32+
:::
3133

3234
### Example
3335

docs/core-concepts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ For this reason, it's important to understand that these streams only represent
127127

128128
If you want to keep one of these streams alive for as long as you need, React-RxJS also exposes `useSubscribe(stream)` and `<Subscribe source$={stream}>{ content }</Subscribe>`, which will render `{ content }` only after it subscribed to `stream`.
129129

130-
With the mental model of streams as a state, it's also worth noting that the observables returned by `bind` don't complete: If the source of that observable completes, it will keep the last value and replay it back to new subscribers, as a completion on the source means that there won't be more changes to that stream. Remember that if the subscriber count reaches 0, this state will be cleaned off and the subscription will restart when a new observer subscribes later on.
130+
With the mental model of "streams as state", it's also worth noting that the observables returned by `bind` won't complete: If the source of that observable completes, it will keep the last value and replay it back to new subscribers, as a completion on the source means that there won't be more changes to that stream. Remember that if the subscriber count reaches 0, this state will be cleaned up, and the subscription will restart when a new observer subscribes later on.
131131

132132
## Composing streams
133133

docs/tutorial/github-issues.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ title: Github Issues Viewer
44

55
import useBaseUrl from '@docusaurus/useBaseUrl';
66

7-
:::caution
8-
This tutorial assumes you are already familiar with both RxJS and React.
7+
:::info Note
8+
This tutorial assumes you are already familiar with both [RxJS](https://rxjs.dev)
9+
and [React](https://reactjs.org).
910
:::
1011

11-
For this tutorial we will be borrowing the [Github issues example that is taught
12-
in the Advanced Tutorial of the Redux Toolkit](https://redux-toolkit.js.org/tutorials/advanced-tutorial).
12+
For this tutorial we will be borrowing the Github issues example that is taught
13+
in the [Advanced Tutorial](https://redux-toolkit.js.org/tutorials/advanced-tutorial)
14+
of the [Redux Toolkit](https://redux-toolkit.js.org).
1315

1416
It's a great example because it starts with a plain React application and it then
1517
shows how to migrate that application to Redux using the Redux Toolkit (RTK). One of the many good

docs/tutorial/todos.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
title: Todo App
33
---
44

5-
:::caution
5+
:::info Note
66
This tutorial assumes you have gone through the [Github Issues Viewer](/docs/tutorial/github-issues)
7-
tutorial, and that you are already familiar with both RxJS and React.
7+
tutorial, and that you are already familiar with both [RxJS](https://rxjs.dev) and [React](https://reactjs.org).
88
:::
99

1010
The purpose of the tutorial is to introduce the most important APIs of the

0 commit comments

Comments
 (0)