Skip to content

Commit 80e60e5

Browse files
Update README.md
1 parent d7de6bb commit 80e60e5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ function TodosComponent() {
8383
```
8484

8585
## useComponentEffects
86-
To use an effect we first need to create it by using the `createEffect` function.
87-
This function takes a callback function which is passed an `Observable` parameter and returns an `Observable`. Every time the `effect` is called, the value is pushed into that `Observable`.
86+
To use an effect we first need to create it by using the `createEffect` function:
8887

8988
```ts
9089
import { createEffect } from '@ngneat/react-rxjs';
@@ -97,7 +96,7 @@ export const searchTodoEffect = createEffect((searchTerm$: Observable<string>) =
9796
});
9897
```
9998

100-
Now we can register it in our component, and call it when we need:
99+
This function takes a callback function which is passed an `Observable` parameter and returns an `Observable`. Every time the `effect` is called, the value is pushed into that `Observable`. Now we can register it in our component, and call it when we need:
101100

102101
```ts
103102
import { useComponentEffects$ } from '@ngneat/react-rxjs';
@@ -109,7 +108,7 @@ function SearchComponent() {
109108
}
110109
```
111110

112-
We can pass multiple effects.
111+
We can pass multiple effects to `useComponentEffects`.
113112

114113

115114
<div>Icons made by <a href="https://www.freepik.com" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a></div>

0 commit comments

Comments
 (0)