purescript-simple-dom icon indicating copy to clipboard operation
purescript-simple-dom copied to clipboard

examples in README should have types

Open cdepillabout opened this issue 9 years ago • 5 comments
trafficstars

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.

cdepillabout avatar Nov 25 '15 06:11 cdepillabout

+1

pedrofurla avatar Jan 09 '16 12:01 pedrofurla

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 avatar Jan 16 '16 01:01 pierrebeaucamp

@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 avatar Jan 16 '16 02:01 cdepillabout

@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.

pierrebeaucamp avatar Jan 16 '16 21:01 pierrebeaucamp

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.

cdepillabout avatar Jan 17 '16 14:01 cdepillabout