purescript-simple-dom
purescript-simple-dom copied to clipboard
examples in README should have types
Coming from Haskell, it's hard to follow the examples in the README without type information. Putting type annotations on the setContents function, modifyLinkTarget function, etc. would make the example much easier to follow.
+1
On a similar note, the examples are a bit outdated.
For example, there is no addEventListener method anymore (I think it was replaced with unsafeAddEventListener).
It would be great to have some more documentation and some working examples for this library.
@pierrebeaucamp The purescript-dom library was created because this library doesn't seem to being updated any more. purescript-dom is also somewhat blessed by the community.
If you're looking for a DOM manipulation library, you may want to check it out.
@cdepillabout I know about purescript-dom but it's stated in its README.md:
The API isn't primarily intended for "human consumption" [...]
I find it simpler to use purescript-simple-dom for manual DOM manipulation. I think there is definitely enough use cases for both libraries to exist side by side. Ideally, purescript-simple-dom should make use of purescript-dom.
I know about purescript-dom but it's stated in its README.md:
The API isn't primarily intended for "human consumption" [...]
Maybe this used to be the case, but it's not true anymore. purescript-dom is currently the "blessed" library if you need do to dom operations (and you can't use a library like thermite or halogen).
Ideally, purescript-simple-dom should make use of purescript-dom.
This is definitely true though.
If you find purescript-dom hard to use for some reason, it might be worthwhile to create a github issue.