The snippets in the article are not using React with hooks. I imagine it would be more similar to your example if the snippets used purescript-react-basic-hooks[1]
[1]: https://github.com/spicydonuts/purescript-react-basic-hooks
[1]: https://github.com/spicydonuts/purescript-react-basic-hooks