Skip to content

Commit 6d0154b

Browse files
committed
add content to doc, fix typo
1 parent 27b9733 commit 6d0154b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ This library is created to address the concerns mentioned above.
4646

4747
### Controller
4848

49-
Defining a `Controller` for a view for view group in a class manner will benefit from these criterias:
49+
Defining a `Controller` for a view or a view group in subclass manner will benefit from these criterias:
5050

5151
- `Inter-Controller Subscription`: `Controller` can subscribe to and depend on each other, allowing for the internal triggering of state emissions.
5252

@@ -417,6 +417,12 @@ const controller = useListener(
417417

418418
Note that this hook is not intended by default to cause re-render, it just simply triggers callback
419419

420+
## For other types
421+
422+
Of course, a view `Controller` is not the only thing that we need to DI in a production app, we have services, repositories, models,... or other types of data.
423+
424+
To acommondate these, you can check out the [react-scoped-provider](https://www.npmjs.com/package/react-scoped-provider) library, it is fully compatible with this library, in fact, the `useProvider` hook is just re-import and re-export from it.
425+
420426
## Conclusion
421427

422428
[Example](https://github.com/SilentCatD/react-state-view-controller/tree/main/example)

0 commit comments

Comments
 (0)