DEV Community

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

Collapse
 
jonahgeek profile image
Jonathan Mwebaze

"Something that drives and controls a major part of your code", don't you think this makes create-react-app the framework and reactjs just a library, just like react-scripts, react-dom, redux etc... We don't build react apps, we use react to build applications. React is just part of it, just like react-dom or even react-router-dom

Thread Thread
 
peerreynders profile image
peerreynders

TL;DR: "Framework" !== "Application Framework"

See my other comment.

React is the core that is responsible for "the operation in the manner of a framework" - orchestrating the application activities and only delegating to user code via inversion of control.

React components (user code) aren't being run by the event loop but by React.

So while React may look like it's just a layer between the components and the JavaScript runtime it's actually React running (calling) the components - components don't use React unless React calls them first.

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