npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@estrellajosem/store

v0.1.0

Published

Angular-native signal-first state management. Actions + decorators from NgRx/NGXS, zero RxJS in components.

Downloads

56

Readme

@ngsi/store

ng + signal — Angular-native, signal-first state management.

Combines the best of NgRx and NGXS: action classes with decorators, a single state tree, and first-class Angular Signals. Zero RxJS in your components.


Why @ngsi/store?

| Feature | NgRx | NGXS | @ngsi/store | | ----------------------------- | ----------- | ---- | --------------- | | Action classes | Factory fns | ✅ | ✅ | | Decorator-based handlers | ❌ | ✅ | ✅ | | Native Signal<T> output | ❌ | ❌ | ✅ | | No toSignal() bridge needed | ❌ | ❌ | ✅ | | computed() selectors | ❌ | ❌ | ✅ | | Effects stay in RxJS | ✅ | ✅ | ✅ | | Redux DevTools | ✅ | ✅ | ✅ |


Installation

npm install @ngsi/store

Peer dependencies: @angular/core >= 17, rxjs >= 7


Quick Start

1. Define actions

export class LoginSuccess {
	static readonly type = '[Auth] Login Success';
	constructor(
		public user: CurrentUser,
		public accessToken: string
	) {}
}

export class Logout {
	static readonly type = '[Auth] Logout';
}

2. Define state

import { SignalState, On, Effect } from '@ngsi/store';

interface AuthStateModel {
	isAuthenticated: boolean;
	currentUser: CurrentUser | null;
}

@SignalState({
	name: 'auth',
	defaults: { isAuthenticated: false, currentUser: null }
})
export class AuthState {
	@On(LoginSuccess)
	loginSuccess(state: AuthStateModel, action: LoginSuccess): Partial<AuthStateModel> {
		return { isAuthenticated: true, currentUser: action.user };
	}

	@On(Logout)
	logout(): Partial<AuthStateModel> {
		return { isAuthenticated: false, currentUser: null };
	}

	@Effect(LoginSuccess)
	onLogin(action: LoginSuccess) {
		// Return an Observable/Promise to dispatch follow-up actions
		return this.http.post('/audit/login', { user: action.user });
	}
}

3. Define selectors

import { createSelector } from '@ngsi/store';

// Selectors are factory functions — call them in injection context
export const selectCurrentUser = createSelector(AuthState, (s) => s.currentUser);
export const selectIsAuthenticated = createSelector(AuthState, (s) => s.isAuthenticated);

// Compose with computed()
export function selectDisplayName(): Signal<string> {
	const user = selectCurrentUser();
	return computed(() => user()?.name ?? 'Guest');
}

4. Register in app.config.ts

import { provideSignalStore, withDevtools } from '@ngsi/store';

export const appConfig: ApplicationConfig = {
	providers: [provideSignalStore([AuthState], withDevtools({ disabled: environment.production }))]
};

5. Use in components — pure signals, no RxJS

import { selectCurrentUser, selectIsAuthenticated } from './auth.selectors';
import { injectDispatch } from '@ngsi/store';

@Component({ ... })
export class AppComponent {
  // Signals — no toSignal(), no async pipe, no subscriptions
  protected readonly currentUser     = selectCurrentUser();
  protected readonly isAuthenticated = selectIsAuthenticated();
  protected readonly displayName     = selectDisplayName();

  private readonly dispatch = injectDispatch();

  login() {
    this.dispatch(new LoginSuccess(user, token));
  }
}

API Reference

Decorators

| Decorator | Target | Description | | ---------------------------------- | ------ | --------------------------------------------------------------- | | @SignalState({ name, defaults }) | Class | Marks a class as a state slice | | @On(...ActionClasses) | Method | Pure state handler — return Partial<State> | | @Effect(...ActionClasses) | Method | Side-effect handler — return Observable, Promise, or void |

DI

| Function | Description | | ------------------------------------------- | ------------------------------------------ | | provideSignalStore(states[], ...features) | Register store + states in app.config.ts | | injectState(StateClass) | Inject raw Signal<StateModel> | | injectDispatch() | Inject (action: object) => void | | createSelector(StateClass, projector) | Create a memoized Signal<R> factory |

Features

| Function | Description | | ----------------------- | -------------------------------------------- | | withDevtools(config?) | Redux DevTools browser extension integration |

Testing

import { provideSignalStoreTesting, dispatchInTest } from '@ngsi/store/testing';

await TestBed.configureTestingModule({
	imports: [MyComponent],
	providers: [provideSignalStoreTesting(AuthState)]
}).compileComponents();

const store = TestBed.inject(SignalStore);
dispatchInTest(store, new LoginSuccess(mockUser, 'token'));