Skip to content

Commit a4fb182

Browse files
authored
Update subscribe/unsubscribe details in README.md (#12)
1 parent f29347a commit a4fb182

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,17 @@ fireOnChange = do
8181
Subscriptions registered using these functions are automatically tracked by Halo.
8282

8383
```purescript
84-
subscribe :: forall props state action m. FRP.Event action -> HaloM props state action m SubscriptionId
84+
subscribe :: forall props ctx state action m. Emitter action -> HaloM props ctx state action m SubscriptionId
8585
86-
unsubscribe :: forall m action state props. SubscriptionId -> HaloM props state action m Unit
86+
unsubscribe :: forall props ctx state action m. SubscriptionId -> HaloM props ctx state action m Unit
8787
```
8888

89-
`FRP.Event` is from the `purescript-event` library.
89+
`Emitter` is from the `purescript-halogen-subscriptions` library.
9090

9191
There is also a version for subscriptions that want to unsubscribe themselves:
9292

9393
```purescript
94-
subscribe' :: forall m action state props. (SubscriptionId -> FRP.Event action) -> HaloM props state action m SubscriptionId
94+
subscribe' :: forall props ctx state action m. (SubscriptionId -> Emitter action) -> HaloM props ctx state action m SubscriptionId
9595
```
9696

9797
Any subscriptions that remain when the component is unmounted are automatically unsubscribed. This prevents requiring manual clean up in the `Finalize` lifecycle event. Also note that new subscriptions will not be created once the `Finalize` event has been fired.

0 commit comments

Comments
 (0)