-
Notifications
You must be signed in to change notification settings - Fork 405
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(router-plugin): mark selectors as pure (#2248)
In this commit, we first remove the `@Selector()` decorator because we can use `createSelector` directly. This also removes `__decorate` calls for the `state` and `url` properties. Secondly, we mark these properties as 'pure.' The `/* @__PURE__ */` hint tells the bundler that `createSelector` has no side effects and that the output of this expression can be safely removed if unused. Therefore, if `state` or `url` is never accessed anywhere in our code, it can be tree-shaken.
- Loading branch information
Showing
2 changed files
with
14 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters