The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Making our toy DOM Driver more flexible

Making our toy DOM Driver more flexible

5:22
Our previous toy DOM Driver is still primitive. We are only able to send strings as the textContent of the container element. We cannot yet create headers and inputs and all sorts of fancy DOM elements. In this lesson we will see how to send objects that describe what elements should exist, instead of strings as the DOM sink.
Watch this lesson now
Avatar
egghead.io

Our previous toy DOM Driver is still primitive. We are only able to sends strings as the textContent of the container element. We cannot yet create headers and inputs and all sorts of fancy DOM elements. In this lesson we will see how to send objects that describe what elements should exist, instead of strings as the DOM sink.

Avatar
Kevin

Related to the characteristics of Observables (also the advice Ben Lesh communicated regarding stream processing advantages of leveraging Observable from typical JS collection objects in a Egghead.io course video), what's your thoughts on leveraging the Observable.fromArray() method for obj.children the moment map, filter, and forEach was needed to be used?

In reply to egghead.io
Avatar
Andre

Well, specially in the case of our toy DOM Driver, it's irrelevant. Also, it's probably irrelevant for small collections. Leveraging Observable operators for typical JS collections probably makes sense when your collection is a least a thousand of items large.

In reply to Kevin
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?