3 ms·
What does "agnostic" really mean here? Or, how is something like React not "agnostic"?
by h3mb3 5y ago
What does "agnostic" really mean here? Or, how is something like React not "agnostic"?
- dumindaxsb 5y agoIt's 100% interoperable with Native DOM API. Basically, CalDOM's reactivity system does not care how the Element is created as long as it's a Native DOM Element/Node. It could be _("+div") or document.createElement("DIV") or even jQuery("<div></div>") See example: https://caldom.org/#reactive-native-node https://caldom.org/#reactive-native-node Also, a CalDOM instance is just a wrapper around Native DOM Element(s). _("div").elem === document.querySelectorAll("div")[0] This interoperability allows for powerful integrations & to update the DOM directly by avoiding expensive virtual-DOM diffing. In React's world, everything is micro-managed(there're pros & cons), accessing DOM directly can be chaotic & usually not recommended.