
Security News
OpenGrep Restores Fingerprinting in JSON and SARIF Outputs
OpenGrep has restored fingerprint and metavariable support in JSON and SARIF outputs, making static analysis more effective for CI/CD security automation.
@reduxjs/angular-redux
Advanced tools
Official Angular bindings for [Redux](https://github.com/reduxjs/redux). Performant and flexible.
Official Angular bindings for Redux. Performant and flexible.
[!WARNING]
This package is in alpha and is rapidly developing.
Angular Redux requires Angular 17.3 or later.
ng add
You can install the Store to your project with the following ng add
command (details here):
ng add @reduxjs/angular-redux@latest
ng add
flagsflag | description | value type | default value |
---|---|---|---|
--path | Path to the module that you wish to add the import for the StoreModule to. | string | |
--project | Name of the project defined in your angular.json to help locating the module to add the provideRedux to. | string | |
--module | Name of file containing the module that you wish to add the import for the provideRedux to. Can also include the relative path to the file. For example, src/app/app.module.ts . | string | app |
--storePath | The file path to create the state in. | string | store |
This command will automate the following steps:
package.json
> dependencies
with Redux, Redux Toolkit, and Angular Reduxnpm install
to install those dependencies.src/app/app.module.ts
> imports
array with provideRedux({store})
standalone bootstrap
, it adds provideRedux({store})
into the application config.npm
or yarn
To use React Redux with your Angular app, install it as a dependency:
# If you use npm:
npm install @reduxjs/angular-redux
# Or if you use Yarn:
yarn add @reduxjs/angular-redux
You'll also need to install Redux and set up a Redux store in your app.
This assumes that you’re using npm package manager with a module bundler like Webpack or Browserify to consume CommonJS modules.
The following Angular component works as-expected:
import { Component } from '@angular/core'
import { injectSelector, injectDispatch } from "@reduxjs/angular-redux";
import { decrement, increment } from './store/counter-slice'
import { RootState } from './store'
@Component({
selector: 'app-root',
standalone: true,
template: `
<button (click)="dispatch(increment())">
Increment
</button>
<span>{{ count() }}</span>
<button (click)="dispatch(decrement())">
Decrement
</button>
`
})
export class AppComponent {
count = injectSelector((state: RootState) => state.counter.value)
dispatch = injectDispatch()
increment = increment
decrement = decrement
}
FAQs
Official Angular bindings for [Redux](https://github.com/reduxjs/redux). Performant and flexible.
The npm package @reduxjs/angular-redux receives a total of 30 weekly downloads. As such, @reduxjs/angular-redux popularity was classified as not popular.
We found that @reduxjs/angular-redux demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
OpenGrep has restored fingerprint and metavariable support in JSON and SARIF outputs, making static analysis more effective for CI/CD security automation.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.