Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# next

- Edit README

# 3.0.1

- Edit example and trigger CI rebuild process
- Edit example and trigger CI rebuild process

# 3.0.0

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ The `source` parameter take in a function to create a `Controller` and keep it w
Another way to provide a `Controller` to children components would be using `ControllerProvider` but pass to the `source` param an instance of `Controller` instead of a create function:

```tsx
// existed isntance else where, you would have to manage the references and cleanup yourself though
// existed instance else where, you would have to manage the references and cleanup yourself though
<ControllerProvider source={counterControllerInstance}>
<CounterComponent />
<ButtonComponent />
Expand Down Expand Up @@ -208,7 +208,7 @@ But for cases that one type of `Controller` may has many implemmentations, subcl
// query type will now become `TestController`
// else where:
// useProvider(TestController)
<ControllerProvider ctor={TestController} source={()=> SubclassOfTestController()}>
<ControllerProvider ctor={TestController} source={()=> new SubclassOfTestController()}>
<Screen />
</ControllerProvider>,
```
Expand Down Expand Up @@ -421,7 +421,7 @@ const controller = useListener(
(prev, curr) => true, // callback filter
)
// or
const controller = useListener(
useListener(
counterInstance,
(state) => console.log(state), // callback when state changed
(prev, curr) => true, // callback filter
Expand Down