All YouTube videos I found and the official docs show how to use Redux for a very specific task, like a todo list app. The example mostly have only one type of data (e.g. todo tasks).
Unfortunately, i have not found a guide how to deal with the following problem:
I have a dashboard app, which displays many different types of data (over 20; contacts data, customer data, invoice data, file information etc.). I have started using Redux like shown in the docs.
I created actions for each type of data. For example:
FETCH_CONTACTS
CREATE_CONTACT
DELETE CONTACT
FETCH_INVOICES
...
My question is, how do I handle my data? Because of the fact, that I have over 20 types of data, invoices should only be loaded, if the user opens /invoices
, contacts only if he opens /contacts
etc. Also what is the best why to implement a filter (search), which gets handled by the server, since a single data type can have over 1000 entries.
Moreover, how do I manage authentication in Redux? Should I have auth actions like:
TRY_LOGIN
LOGOUT
...