I am a BE dev and now I'm learning Angular 6. I'm really interested in State management using NGXS. I have several concerns with an example below:
I have an endpoint which return a set, about 16-20k records, of Accounts. This endpoint will be called when user opens the app and logs in successfully on browser. The returned data will be saved in store and it can be used in the whole life cycle of the application.
By storing the data in store, this list can be shared between components in the app, including: filter and search by account, update account information, etc.
Also, we can reduce the number of api call to filter the result (maybe there is a better approach here, please correct me!), and this would improve the UI/UX of the application.
My questions are:
is it the right place to call endpoint to get and save such a large amount of data to store at beginning?
will storing a large amount of data in store improve performance of the application?
I think it's not really good approach to get all 16-20k accounts for this purpose, is there any better way to do?
security problem: will storing account in store be easy to be exploited?