Skip to content

Instantly share code, notes, and snippets.

View ognjenjevremovic's full-sized avatar
⚠️
[object Object]

Ognjen Jevremović ognjenjevremovic

⚠️
[object Object]
  • Belgrade, Serbia
  • 15:09 (UTC +01:00)
View GitHub Profile
@ognjenjevremovic
ognjenjevremovic / Guide-to-Custom-Nx-Schematic.md
Created April 25, 2020 18:43 — forked from ThomasBurleson/Guide-to-Custom-Nx-Schematic.md
Custom Nx workspace schematic to build a custom 'state' library.

Scenario

We want to build a custom schematic for company Aero that will internally do two things:

  • build a new ngrx library using Nx workspace naming conventions
  • generate ngrx state-management files; include the *.facade.* files

Important: This example is valid ONLY for Nx v6.2.x or higher!

@ognjenjevremovic
ognjenjevremovic / tickets.facade.md
Created April 25, 2020 18:40 — forked from ThomasBurleson/tickets.facade.md
Using ngrx with Effects + Facades

NgRx State Management with TicketFacade

Facades are a programming pattern in which a simpler public interface is provided to mask a composition of internal, more-complex, component usages.

When writing a lot of NgRx code - as many enterprises do - developers quickly accumulate large collections of actions and selectors classes. These classes are used to dispatch and query [respectively] the NgRx Store.

Using a Facade - to wrap and blackbox NgRx - simplifies accessing and modifying your NgRx state by masking internal all interactions with the Store, actions, reducers, selectors, and effects.

For more introduction, see Better State Management with Ngrx Facades