O'Reilly logo

NativeScript for Angular Mobile Development by Nathanael J. Anderson, Nathan Walker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Designing the state model

Before integrating ngrx, it's good to first think about the various aspects of state throughout your app in addition to which module they might pertain to. With our app, here's a reasonable starter list (not meant to be complete or thorough at this point):

  • CoreModule:
    • user: any; user-related state:
      • recentUsername: string; most recently used successful username
      • current: any; authenticated user (if there is one)
  • MixerModule:
    • mixer: any: mixer-related state
      • compositions: Array<IComposition>; list of user-saved compositions
      • activeComposition: CompositionModel; the active composition
  • PlayerModule:
    • player: any; various aspects of player state.
      • playing: boolean; whether audio is playing or not.
      • duration: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required