Introduction
While building React applications, to improve their quality, we should use industry best practices. Data and its flow are important in our applications and for guidance, it is important to consider the Model-View-Controller (MVC) architecture. MVC is a common architectural pattern that is comprised of three main logical components: the Model, the View, and the Controller. The Model relates to data in the application and might even connect to a database. The Controller holds any business logic and causes changes to be made to the Model. Finally, the View is the presentation layer where changes in the Model are reciprocated.
In information technology, another aspect to consider is that software systems can store information about user interactions and events in something called the state. It is used to serve relevant content. A system that uses state is said to be stateful.
The Model part of the MVC architecture and the state in a stateful system are key to data integrity...