News for hackers. Stuff that matters.
Re:How to write PureScript react components to replace JavaS... by noelwelsh on Thursday June 25, 2020 @10:51AM (#23641416)
You are correct, which is why I said "[I]t's not 100% identical".

Although I can read Purescript reasonably well I'm not so proficient writing it (I do most of my programming in a different FP language, so I understand the concepts but not the specifics.) I didn't attempt to modify the code I pulled from the example because it would take more time than I have to install Purescript and check my modifications.

It would be simple to add this functionality. This equivalent of the `counterType` would be an algebraic data type, defined looking something like

  data counterType = Increment | Decrement
and usage something like

  case counterType of
    Increment -> ... make increment here ...
    Decrement -> ... make decrement here ...

There are no comments on this comment yet.