DEV Community

Discussion on: What is the difference between Library vs Framework?

 
peerreynders profile image
peerreynders • Edited

What's the concrete thing that from your Point of view makes React a framework and µhtml a library?

  • µhtml: What calls the update() function ? update(START) - i.e. user code. By extension html and render are only called by user code.
  • React: What calls the App() component? React. render(h(App), document.querySelector('.js-root')); only hands over the component to React - it's up to React to invoke it. By extension any code inside of App() (the "user code") only runs when React wants it to.

As I wrote in my second comment:

  • If your code calls it, it's a library.
  • If it calls your code, it's a framework.

Some comments have been hidden by the post's author - find out more