Skip to content

Commit c021a58

Browse files
douglaseggletonjosepot
authored andcommitted
Update core-concepts.md
1 parent 7d57039 commit c021a58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/core-concepts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ import { interval } from "rxjs"
114114
import { take } from "rxjs/operators"
115115
import { bind } from "@react-rxjs/core"
116116

117-
const [useFirst5SpacedNumbers, first5SpacedNumbers] = bind(
117+
const [useFirst5SpacedNumbers, first5SpacedNumbers$] = bind(
118118
interval(1000).pipe(take(5)),
119119
)
120120
```
@@ -237,7 +237,7 @@ import { bind } from "@react-rxjs/core"
237237
const [useTodos, todos$] = bind(ajax.getJSON("/todos").pipe(startWith(null)))
238238
```
239239

240-
Now `usePost` will emit `null` immediately while it's fetching data (so that we can manually handle that), instead of suspending the component, and when the ajax call is resolved, it will emit the result of that call.
240+
Now `useTodos` will emit `null` immediately while it's fetching data (so that we can manually handle that), instead of suspending the component, and when the ajax call is resolved, it will emit the result of that call.
241241

242242
When using Suspense, however, there's also another way to suspend a component with `react-rxjs`: by emitting `SUSPENSE`. For example, this can come in handy if you need to refresh the data because some filter has changed.
243243

0 commit comments

Comments
 (0)