Skip to content

Commit 5da4782

Browse files
authored
02-Introducing-Components H.Component type params (purescript-halogen#736)
* 02-Introducing-Components H.Component type params As of Halogen 6, `H.Component` takes four type parameters (`query input output m`), but the text says it takes "five" * H.Component no longer takes HH.HTML as type var
1 parent d862068 commit 5da4782

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/guide/02-Introducing-Components.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,14 +253,14 @@ The `mkComponent` function produces a component from a `ComponentSpec`, which is
253253
mkComponent :: H.ComponentSpec ... -> H.Component query input output m
254254
```
255255

256-
The resulting component has the type `H.Component`, which itself takes five type parameters that describe the public interface of the component. Our component doesn't communicate with parent components or child components, so it doesn't use any of these type variables. Still, we'll briefly step through them now so you know what's coming in subsequent chapters.
256+
The resulting component has the type `H.Component`, which itself takes four type parameters that describe the public interface of the component. Our component doesn't communicate with parent components or child components, so it doesn't use any of these type variables. Still, we'll briefly step through them now so you know what's coming in subsequent chapters.
257257

258258
1. The first parameter `query` represents a way that parent components can communicate with this component. We will talk about it more when we talk about parent and child components.
259259
1. The second parameter `input` represents the input our component accepts. In our case, the component doesn't accept any input, so we'll leave this variable open.
260260
1. The third parameter `output` represents a way that this component can communicate with its parent component. We'll talk about it more when we talk about parent and child components.
261261
1. The final parameter, `m`, represents the monad that can be used to run effects in the component. Our component doesn't run any effects, so we'll leave this variable open.
262262

263-
Our counter component can therefore be specified by leaving all of the `H.Component` type variables open except for the first one, `HH.HTML`.
263+
Our counter component can therefore be specified by leaving all of the `H.Component` type variables open.
264264

265265
## The Final Product
266266

0 commit comments

Comments
 (0)