Next in this series, we’re going to learn how to test Reducers in NGRX Store. In the previous testing post we explored Testing Actions.
As we know, Reducers are just pure functions. This makes it extremely easy to test your reducers - which control state changes - and respond to actions accordingly.
Another reason to...
In this small NGRX Store testing series, we’re going to learn how to test Actions, Reducers and Selectors. Let’s begin with Actions, or more specifically Action Creators and how to test them.
Table of contents
Testing Actions
What we’ll test
Spec File
Creating an instance
Assertions
...
With Angular, we have many approaches to adding, removing, toggling classes. We can choose single classes and bind a property, or we can use the awesome NgClass directive from Angular.
In this post, we’ll explore class bindings, and also Angular’s NgClass directive, the syntaxes and also some best practice ideas.
...
There are many ways we can type a property to declare to TypeScript something is an array, or contains an array of “something”. We have generic types, array types and type assertions.
For the purposes of this article, we’ll simply use a TypeScript class to demonstrate how we can declare some of these properties, in th...