Skip to content

Commit

Permalink
Update README to match new event handler syntax (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsoikin authored Jan 3, 2023
1 parent ae9c0c8 commit 96345e2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.9.1

### Changed

- upgraded to Elmish 0.9.1

## 0.7.0

### Changed
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ useMousePosition className =
, update: \_ pos -> pure pos
, view: \pos dispatch ->
H.div_ className
{ onMouseMove: unsafeCoerce $ mkEffectFn1 \(event :: { clientX :: Number, clientY :: Number, currentTarget :: HTMLElement }) -> do
{ onMouseMove: E.handleEffect \(E.MouseEvent event) -> do
{ top, left, width, height } <- getBoundingClientRect event.currentTarget
let
x = event.clientX - left
Expand All @@ -81,7 +81,7 @@ If you’re only using a single hook, sometimes it might be more concise to use
```purs
myInput :: ReactElement
myInput = useState "" =/> \name setName ->
H.input_ "" { value: name, onChange: setName <?| eventTargetValue }
H.input_ "" { value: name, onChange: setName <| E.inputText }
```

### Examples
Expand Down
2 changes: 1 addition & 1 deletion packages.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ let upstream =
sha256:4949f9f5c3626ad6a83ea6b8615999043361f50905f736bc4b7795cba6251927

in upstream
with elmish.version = "v0.9.0"
with elmish.version = "v0.9.1"
with elmish-html.version = "v0.8.0"

0 comments on commit 96345e2

Please sign in to comment.