React: What is a host instance?
23 October 2022 (Updated 23 October 2022)
On this page
In a nutshell
Host trees consist of nodes that can be called “host instances”. For example, the DOM provides objects like HTMLDivElement
, HTMLButtonElement
, HTMLHeadingElement
, etc. The host environment typically provides you with an imperative API to manipulate these instances.
One of the benefits of using React is that you can describe your UI declaratively as a function of state. You write components that can render differently depending on state and React takes care of using the imperative APIs to reconcile the host instances with each React element.
Sources
Tagged:
React
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment