Ngrx with feature flags - best practices

372 Views Asked by At

I am using ngrx in my project and I would like to include feature flagging on it, but I was checking some articles on the web and none of them mention ngrx, they used plain Angular service, guard or directive.

I was wondering if that makes sense as I did not found any article or comment mentioning it and it may not be the best solution integrate with ngrx.

My idea was to save the config of feature flags in the global store and then create specific selectors for each feature where we want to use them.

Some examples would be:

  • If we want to disable a route, check a selector in a guard.
  • If we want to disable a functionality in a component, use a specific selector to check the config property.

My question is: has anyone include feature flags with ngrx? Which are the best practices to configure it properly (if it makes sense)?

Thanks in advance!

0

There are 0 best solutions below