Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@ngrx/store-devtools
Advanced tools
@ngrx/store-devtools is a powerful tool for debugging and inspecting the state of your Angular applications using NgRx. It provides time-travel debugging, state inspection, and action logging, which can significantly enhance the development experience.
Time-Travel Debugging
Time-travel debugging allows you to go back and forth through the state changes in your application. This is useful for understanding how state evolves over time and for identifying where things might have gone wrong.
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
import { environment } from '../environments/environment';
@NgModule({
imports: [
StoreDevtoolsModule.instrument({
maxAge: 25, // Retains last 25 states
logOnly: environment.production, // Restrict extension to log-only mode
}),
],
})
export class AppModule {}
State Inspection
State inspection allows you to view the current state of your application at any point in time. This can be extremely helpful for debugging and understanding the state of your application.
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
@NgModule({
imports: [
StoreDevtoolsModule.instrument({
maxAge: 25,
logOnly: false,
}),
],
})
export class AppModule {}
Action Logging
Action logging provides a log of all the actions that have been dispatched in your application. This can help you understand the sequence of events that led to a particular state.
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
@NgModule({
imports: [
StoreDevtoolsModule.instrument({
maxAge: 25,
logOnly: false,
}),
],
})
export class AppModule {}
Redux DevTools is a set of tools to help debug Redux applications. It offers similar functionalities to @ngrx/store-devtools, such as time-travel debugging, state inspection, and action logging. However, it is designed for use with Redux rather than NgRx.
MobX DevTools provides a set of tools for debugging MobX applications. It includes features like state inspection and action logging, similar to @ngrx/store-devtools, but is tailored for use with MobX.
Vue DevTools is a set of debugging tools for Vue.js applications. It offers state inspection, time-travel debugging, and action logging, similar to @ngrx/store-devtools, but is specifically designed for Vue.js.
The sources for this package are in the main NgRx repo. Please file issues and pull requests against that repo.
License: MIT
19.0.0-rc.0 (2024-12-10)
signalMethod
(#4597) (bdd1d3e), closes #4581withProps
base feature (#4607) (e626082)withProps
(#4612) (5f803d0), closes #4608computed
property in SignalStoreFeatureResult
type is renamed to props
.EntityComputed
and NamedEntityComputed
types in the entities
plugin are renamed to EntityProps
and NamedEntityProps
.BEFORE:
import { computed, Signal } from '@angular/core';
import { signalStoreFeature, SignalStoreFeature, type, withComputed } from '@ngrx/signals';
import { EntityComputed } from '@ngrx/signals/entities';
export function withTotalEntities<Entity>(): SignalStoreFeature<{ state: {}; computed: EntityComputed<Entity>; methods: {} }, { state: {}; computed: { total: Signal<number> }; methods: {} }> {
return signalStoreFeature(
{ computed: type<EntityComputed<Entity>>() },
withComputed(({ entities }) => ({
total: computed(() => entities().length),
}))
);
}
AFTER:
import { computed, Signal } from '@angular/core';
import { signalStoreFeature, SignalStoreFeature, type, withComputed } from '@ngrx/signals';
import { EntityProps } from '@ngrx/signals/entities';
export function withTotalEntities<Entity>(): SignalStoreFeature<{ state: {}; props: EntityProps<Entity>; methods: {} }, { state: {}; props: { total: Signal<number> }; methods: {} }> {
return signalStoreFeature(
{ props: type<EntityProps<Entity>>() },
withComputed(({ entities }) => ({
total: computed(() => entities().length),
}))
);
}
<a name="19.0.0-beta.0""></a>
FAQs
Developer tools for @ngrx/store
The npm package @ngrx/store-devtools receives a total of 373,224 weekly downloads. As such, @ngrx/store-devtools popularity was classified as popular.
We found that @ngrx/store-devtools demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.