i'm using react js and redux and did an authentication with jwt.
I have a navbar with a dropdown. This dropdown is only visible for authenticated users. The dropdown items are dynamicly and should be loaded from a server after an user logged in.
But i have no idea where i should trigger the api call to load the dropdown items. When i click on "login" an authentication action will be triggerd. In this action i do the authentication and return a boolean to a reducer. Then the state "authenticated" switched to "true" and he dropdown will be shown. Now the dropdown items should be displayed to the user.
But when i should load them?
My thinking was to put the "load dropdown items" logic into a reducer so i can wait for the "authenticated" action. But the logic should be implemented in the action, should it?
Do you have any ideas what i can do?