You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,17 +81,17 @@ fireOnChange = do
81
81
Subscriptions registered using these functions are automatically tracked by Halo.
82
82
83
83
```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
85
85
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
87
87
```
88
88
89
-
`FRP.Event` is from the `purescript-event` library.
89
+
`Emitter` is from the `purescript-halogen-subscriptions` library.
90
90
91
91
There is also a version for subscriptions that want to unsubscribe themselves:
92
92
93
93
```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
95
95
```
96
96
97
97
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