Original scientific paper
https://doi.org/10.25027/ag.33.1.3
Characteristics and comparison of global state management tools in react applications
Sanja Brekalo
orcid.org/0000-0002-8631-0821
; Međimurje University of Applied Sciences in Čakovec; Bana Josipa Jelačića 22a, Čakovec, Croatia
*
Klaudio Pap
; University of Zagreb Faculty of Graphic Arts, Getaldićeva 2, Zagreb, Crpatia
Florijan Kos
; Međimurje University of Applied Sciences in Čakovec; Bana Josipa Jelačića 22a, Čakovec, Croatia
* Corresponding author.
Abstract
This paper analyses and compares four tools for global state management in React applications, namely Context API, Zustand, Redux and MobX. The aim of the comparison was to define the advantages and limitations of each tool in different application scenarios. The Context API is a built-in tool for managing global application state that solves the problem of passing props through components – prop drilling. Other analysed tools need to be added separately to the project, and they were created as a solution to the limitations of the Context API. The results showed that Context API is best suited for smaller and medium-complex projects, Zustand is optimized for all project sizes, while Redux and MobX are more applicable for large and complex applications with complex global state. The Context API can become limiting in complex applications due to performance issues, context losses, or the lack of a solution to directly prevent the Zombie Child problem. Other tested tools have built-in solutions to the mentioned problems. Zustand has proven to be a comprehensive solution with
Keywords
react, context API, MobX, zustand, redux
Hrčak ID:
329694
URI
Publication date:
31.3.2025.
Visits: 1.094 *