Is React a framework?

Last updated

No, React isn’t considered a framework. It’s described as a library, specifically A JavaScript library for building user interfaces1. It’s often called a framework and combined with other JS libraries it can feel like one. On its own, however, React is a library.

Why is React a library and not a framework?

React is focused on one thing. It’s the view layer in MVC, React is only concerned with the user interface. A framework is similar to a library but the scope of what it is intended to be used for is much greater. It might be concerned with the UI, data fetching, database access and more. A good example of a framework is Angular. It’s purpose is similar to React but has more opinions on how data should flow through your application, the rules to setup routing and how to structure your app.

React is different, there are no rules on where your files should go. There are best practices but these are strict rules that are enforced. How does client-side routing work? By default, it doesn’t. You can find a library to do it for you or roll your own. How do you manage state in React? There are some built-in ways otherwise you’re on your own. You get the idea.

Footnotes

A Fullstack Software Engineer working with React and Django. My main focus is JavaScript specialising in frontend UI with React. I like to explore different frameworks and technologies in my spare time. Learning languages (programming and real life) is a blast.

Privacy PolicyTerms and ConditionsRSS
© 2020 by Benevolent Bytes. All rights reserved.
Website crafted by Seth Coker