In this article we will learn how to avoid duplication of RxJS operators imports in your Angular project files.
I love working with RxJS in Angular projects. But I often forget how to import the operators. Some editors such as VSCode provide the capability of creating and saving your own code snippets, and this helps a lot.
However, when working with Angular, NgRx or Ionic, we create services, providers and effects files and to help us manipulating the data we use RxJS operators. And even using code snippets, we end up repeating the same RxJS operator imports throughout our files.
For this reason, I usually create a RxJS file with the operators used by the project (usually in the shared or common module). You can also create this file directly in the
... read the whole story at loiane.com.