All the Cycle.js examples I've found so far, use a single DOM
object, named "DOM", in the drivers
argument to run(main, drivers)
. Is it possible to have more than one object, e.g., one named "DOM1" and another "DOM2"? The purpose of this would be to control two separate dynamic DOM areas within a single HTML page, in order to keep a third DOM area statically defined in index.html
, and sandwiched between DOM1 and DOM2.
As a side question, the examples I've seen typically target an HTML div
with an id of #app
or #main-container
, and then the sink is defined with a @cycle/dom
div
function, thus creating AFAICT an unnecessary div
within a div
. I haven't found a clear explanation or reference of how the virtual nodes are supposed to be defined. Say that DOM2 above targets an HTML form
element and that is supposed to contain two input
elements. Does it have to start with a div
as in all the examples, or can the input
s be defined directly in the .map
call, and if so, how?