My understanding of the vital difference between a library and a framework is whether my application code uses the package code or the package runs my application code - otherwise called "inversion of control".
It makes sense that react
is a UI library since I can create a DOM interface (its representation).
But when I want to render it using react-dom
, my application can only trigger a render (by calling ReactDOM.render()
, state updates or forced updates) but it is upto react-dom
to decide when to render it.
Since react-dom
takes up the responsibility to render the UI, does it qualify as a framework? And if not, please give an explanation so I can clear my understanding of the topic.
PS: Perhaps SO is not the best place for this question. If you know a better on, do let me know.