purescript-hareactive icon indicating copy to clipboard operation
purescript-hareactive copied to clipboard

Move all DOM-related constructions to another package

Open xgrommx opened this issue 6 years ago • 3 comments

Hello @paldepind I think will be better to have another package for DOM-related constructions. We should use FRP without DOM-related things. That just my thoughts

xgrommx avatar May 03 '19 06:05 xgrommx

Hi @xgrommx. Thank you for sharing your opinion.

We should use FRP without DOM-related things.

Yes, we definitely agree on that :+1: As a case in point, @limemloh has been working on using Hareactive and Turbine together with NativeScript where there is no DOM.

On the current master of purescript-hareactive all DOM related functions are isolated in the Hareactive.DOM module. Additionally, the latest release of Hareactive moved all DOM related features into a separate file which must be imported like import ... from "@funkia/hareactive/dom". This file is only imported in the PureScript bindings here i the DOM module.

All in all, this means that if one do not use the Hareactive.DOM module then zero DOM related code will be loaded.

Do you think this avoid the need for another package for DOM-related functions? Because, Hareactive has very few DOM related things and don't feel that moving them into a separate package is worth the complexity and extra overhead for the users. What do you think?

paldepind avatar May 03 '19 13:05 paldepind

@paldepind I think another package will be better. For example if I working with nodejs and I don't want DOM-related things.

xgrommx avatar May 03 '19 14:05 xgrommx

@xgrommx What do you think the practical benefits of a separate package is?

paldepind avatar May 06 '19 15:05 paldepind