Skip to content

Commit 803c634

Browse files
committed
fix docs and readme
1 parent 7bcfff3 commit 803c634

File tree

2 files changed

+26
-13
lines changed

2 files changed

+26
-13
lines changed

README.md

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ TODO - TBD - WIP
2424
- A Kotlin Multiplatform library that provides a simple event bus implementation using
2525
`kotlinx.coroutines.channels.Channel`s.
2626
This is useful for UI applications where you want to send events to communicate between
27-
different parts / scope of your application.
27+
different parts / scope of your application (e.g. send results from a screen to another screen).
2828

2929
- This bus is thread-safe to be used by multiple threads.
3030
It is safe to send events from multiple threads without any synchronization.
@@ -78,27 +78,40 @@ bus
7878

7979
## Docs
8080

81-
TODO - TBD - WIP
81+
- `0.x release` docs: https://hoc081098.github.io/kotlin-channel-event-bus/docs/0.x
82+
- Snapshot docs: https://hoc081098.github.io/kotlin-channel-event-bus/docs/latest/
8283

8384
## Sample
8485

8586
- [Android Compose sample](https://github.com/hoc081098/kotlin-channel-event-bus/tree/master/sample/app):
8687
an Android app using Compose UI to show how to use the library.
87-
It has two nested navigation graphs: `RegisterScreen` and `HomeScreen`.
88+
It has two nested navigation graphs: `Register` and `Home`.
89+
90+
- In `Register`, we have 3 steps (3 screens) to allow user to input their information, step
91+
by
92+
step.
93+
- A `RegisterSharedViewModel` (bound to `Register` navigation graph scope) is used
94+
to hold the whole state of the registration process.
95+
It observes events from the `ChannelEventBus` and update the state accordingly.
8896

89-
In `RegisterScreen`, we have 3 steps (3 screens) to allow user to input their information, step by
90-
step.
91-
- A `RegisterSharedViewModel` (bound to `RegisterScreen` navigation graph scope) is used
92-
to hold the whole state of the registration process.
93-
It observes events from the `ChannelEventBus` and update the state accordingly.
97+
- Each step screen has a `ViewModel` to hold the state of the screen, and will send events to
98+
the `ChannelEventBus`,
99+
then the `RegisterSharedViewModel` will receive those events and update the state.
94100

95-
- Each step screen has a `ViewModel` to hold the state of the screen, and will send events to
96-
the `ChannelEventBus`,
97-
then the `RegisterSharedViewModel` will receive those events and update the state.
101+
- In `Home` nav graph, we have 2 screens: `Home` and `Detail`.
102+
- `Home` screen has a `HomeViewModel` to hold the results received from the `Detail` screen.
103+
Those result events are sent from the `Detail` screen to the `ChannelEventBus`,
104+
and the `HomeViewModel` will receive those events and update the state.
105+
106+
- `Detail` screen will send events to the `ChannelEventBus` when user clicks on the button.
107+
The `HomeViewModel` will receive those events and update the state.
98108

99109
## Roadmap
100110

101-
TODO - TBD - WIP
111+
- [ ] Support more targets: `wasm` (depends on supported targets by `kotlinx.coroutines`).
112+
- [ ] More samples.
113+
- [ ] More docs.
114+
- [ ] More tests.
102115

103116
## License
104117

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
site_name: KMP ViewModel
1+
site_name: Kotlin Channel Event Bus
22
site_url: https://hoc081098.github.io/kotlin-channel-event-bus/docs/0.x
33
repo_name: kotlin-channel-event-bus
44
repo_url: https://github.com/hoc081098/kotlin-channel-event-bus

0 commit comments

Comments
 (0)