DEV Community

Discussion on: Why is React a library and not a (simple) framework?

Collapse
 
peerreynders profile image
peerreynders

The litmus test:

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

Looking at the React tutorial Starter Code ReactDOM.render() is the only part of React that your code calls. The rest, i.e. the majority of your code, is called by React.

Ipso facto - React is a framework because it is in control when most of your code runs.

For the expanded argument see: React is a (view component) framework