State Management in Angular Using NGXS - Part 1

See how it’s easy to manage your Angular application’s state using NGXS and learn how you can use NGXS with Auth0’s SDK to handle user-related functionalities.
Read more…

:writing_hand:t2: Brought to you by @williamjuan027

How did you like this post folks? Please share any comments or feedback with us on this thread

There is one big problem. starting repository does not exist :neutral_face:

Hey @KonradG! The Repo now is available, now you can see it.

Hi. I have a question regarding the returned values from an Action…

@Action(Menus.EditMenuItemFormSubmitted)
editMenuItem(... ) {
   ...
   this.apiService...
      tap(..),
      map(() => {
        return ctx.dispatch(...)
      })

I see we need to return the apiService observable for NGXS to subscribe to, but is the map with returned ctx.dispatch required (or usable in another scenario). Was wondering could this be a tap with dispatch?

Hi. The repository doesn’t contain the starter branches:

https://github.com/auth0-blog/spa_angular_typescript_dashboard

1 Like

cc: @robertino.calcaterra

1 Like

I’ve added the starter branch along with the rest of the branches referred in the blog post

1 Like

You’re right. The ctx.dispatch doesn’t have to be returned and could be within the tap instead of the map.