Skoči na glavni sadržaj

Izvorni znanstveni članak

https://doi.org/10.25027/ag.33.1.3

Characteristics and comparison of global state management tools in react applications

Sanja Brekalo orcid id orcid.org/0000-0002-8631-0821 ; Međimursko veleučilište u Čakovcu, Bana Josipa Jelačića 22a, Čakovec, Hrvatska *
Klaudio Pap ; Sveučilište u Zagrebu Grafički fakultet, Getaldićeva 2, Zagreb, Hrvatska
Florijan Kos ; Međimursko veleučilište u Čakovcu, Bana Josipa Jelačića 22a, Čakovec, Hrvatska

* Dopisni autor.


Puni tekst: engleski pdf 351 Kb

str. 23-33

preuzimanja: 743

citiraj


Sažetak

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

Ključne riječi

react, context API, MobX, zustand, redux

Hrčak ID:

329694

URI

https://hrcak.srce.hr/329694

Datum izdavanja:

31.3.2025.

Posjeta: 1.094 *