I am new to Angular and this question might be very broad. But I am interested in learning more on State management usage. Recently one of our project implemented state management using NGXS library. However I am trying to understand what are all the advantages it brought to application?

The implementation is very deep and on high level, there are some actions which carry application data (as set by user) and listeners to those actions which process the request and dispatches to next step as required. How this is different in terms of application usage or performance etc., from general angular application. I am at beginning stage of understanding state management and so I feel like I am writing so much of code which mayn't be really required. example - just to route to another page, i had to implement a state modal to hold the object and declare an action and a listener to implement that action.

I am going over several documentations and getting details on how state management can be implemented but not getting the right answer for why state management should be implemented.

Thank you in advance!