MCPcopy
hub / github.com/rx-angular/rx-angular

github.com/rx-angular/rx-angular @21.2.0 sqlite

repository ↗ · DeepWiki ↗ · release 21.2.0 ↗
3,061 symbols 7,315 edges 1,025 files 201 documented · 7%
README

RxAngular logo

RxAngular RxAngular CI

RxAngular offers a comprehensive toolkit for handling fully reactive Angular applications with the main focus on runtime performance, template rendering, and Developer eXperience.

Packages

RxAngular is made up of different packages that work together or standalone.

Package Description Version
@rx-angular/state A powerful state management library, providing a fully reactive way to manage state in components and services. npm
@rx-angular/template A set of directives and pipes designed for high-performance and non-blocking rendering for large-scale applications. npm
@rx-angular/cdk A Component Development Kit for high-performance and ergonomic Angular UI libs and large-scale applications. npm
@rx-angular/isr A library that enables Angular Universal applications to generate static pages at runtime and then update them incrementally on demand or on a schedule. npm
@rx-angular/eslint-plugin A set of ESLint rules for building reactive, performant, and zone-less Angular applications. npm

This repository holds a set of helpers that are aiming to provide:

  • fully reactive applications
  • fully or partially zone-less applications
  • high-performance and non-blocking rendering

Getting Started

Using @rx-angular/template

This is an example of how to use the *rxLet directive to bind an Observable value to the template. In this example, the component defines a property time$, which is an Observable that emits a value every second using the timer operator. The emitted values are mapped to the current time string using the map operator which is then displayed in the template using *rxLet.

import { RxLet } from '@rx-angular/template/let';

@Component({
  selector: 'app-time',
  standalone: true,
  imports: [RxLet],
  template: `
    <ng-container *rxLet="time$; let value">
      {{ value }}
    </ng-container>
  `,
})
export class TimeComponent {
  time$ = timer(0, 1000).pipe(map(() => new Date().toTimeString()));
}

To learn more about @rx-angular/template and its capabilities, check out the official documentation at https://rx-angular.io/docs/template.

Using @rx-angular/state

In this example, we're creating a fully reactive counter component. We use rxState to manage the component's state, rxActions to define structured actions for state updates (specifically increment and decrement), and rxEffects to trigger side-effects when state changes occur. These mechanisms collectively enable efficient state management, action handling, and side-effect execution, resulting in a responsive and well-structured counter component.

import { rxState } from '@rx-angular/state';
import { rxEffects } from '@rx-angular/state/effects';
import { rxActions } from '@rx-angular/state/actions';
import { RxPush } from '@rx-angular/template/push';

@Component({
  selector: 'app-counter',
  standalone: true,
  imports: [RxPush],
  template: `


Count: {{ count$ | push }}


    <button (click)="actions.increment()">Increment</button>
    <button (click)="actions.decrement()">Decrement</button>
  `,
})
export class CounterComponent {
  readonly actions = rxActions<{
    increment: void;
    decrement: void;
  }>();

  private readonly state = rxState<{
    count: number;
  }>(({ set, connect }) => {
    set({ count: 0 });
    connect(this.actions.increment$, (state) => ({
      count: state.count + 1,
    }));
    connect(this.actions.decrement$, (state) => ({
      count: state.count - 1,
    }));
  });

  readonly count$ = this.state.select('count');

  constructor() {
    rxEffects(({ register }) => {
      register(this.count$, (count) => console.log(`Count changed: ${count}`));
    });
  }
}

To learn more about @rx-angular/state and its capabilities, check out the official documentation at https://rx-angular.io/docs/state.

Links

Contributing

We welcome contributions from the community to help improve RxAngular! To get started, please take a look at our contribution guidelines in the CONTRIBUTING.md file. We appreciate your help in making RxAngular better for everyone.

License

This project is MIT licensed.


Made with ❤ by push-based.io

Extension points exported contracts — how you extend this code

SchedulerAction (Interface)
(no doc) [6 implementers]
apps/demos/src/app/rx-angular-pocs/cdk/utils/zone-agnostic/rxjs/schedulers/types.ts
RxListManager (Interface)
(no doc) [6 implementers]
libs/cdk/template/src/lib/list-template-manager.ts
IsrServiceInterface (Interface)
(no doc) [4 implementers]
libs/isr/models/src/isr-service.interface.ts
DocsSectionConfig (Interface)
* THX TO @michaelbromley * copied from here: https://github.com/vendure-ecommerce/vendure/blob/8592e9d80427f08ff7454cd9
tools/scripts/docs/generate-typescript-docs.ts
OnDestroy$ (Interface)
(no doc) [1 implementers]
libs/state/effects/src/lib/model.ts
_RxVirtualViewContent (Interface)
(no doc) [1 implementers]
libs/template/virtual-view/src/lib/model.ts
User (Interface)
(no doc)
apps/ssr-hydration/src/app/vv-demo.ts
Chainable (Interface)
(no doc)
apps/ssr/cypress/support/commands.ts

Core symbols most depended-on inside this repo

detectChanges
called by 562
apps/demos/src/app/shared/utils/cd-helper.ts
next
called by 445
libs/cdk/render-strategies/src/lib/strategy-handling.ts
get
called by 287
libs/state/src/lib/rx-state.service.ts
set
called by 248
libs/state/src/lib/rx-state.service.ts
run
called by 208
libs/cdk/internals/scheduler/src/lib/schedulerMinHeap.ts
subscribe
called by 203
libs/state/src/lib/rx-state.service.ts
connect
called by 111
libs/state/src/lib/rx-state.service.ts
createTestComponent
called by 109
libs/template/for/src/lib/tests/fixtures.ts

Shape

Method 1,083
Class 1,032
Function 711
Interface 218
Enum 17

Languages

TypeScript100%

Modules by API surface

libs/template/virtual-scrolling/src/lib/scroll-strategies/autosize-virtual-scroll-strategy.ts33 symbols
apps/demos/src/app/shared/debug-helper/value-provider/utils.ts31 symbols
libs/state/effects/src/lib/effects.service.spec.ts29 symbols
libs/cdk/template/src/lib/rx-live-collection.ts29 symbols
libs/cdk/template/src/lib/list-view-context.ts26 symbols
libs/template/virtual-scrolling/src/lib/scroll-strategies/dynamic-size-virtual-scroll-strategy.ts24 symbols
libs/state/actions/src/lib/docs.spec.ts24 symbols
apps/demos/src/app/shared/ripple/rxa-responsive-meter.ts23 symbols
tools/scripts/docs/typescript-docs-renderer.ts20 symbols
tools/scripts/docs/typescript-docs-parser.ts20 symbols
libs/isr/server/src/cache-handlers/filesystem-cache-handler.ts20 symbols
libs/cdk/template/src/lib/list-view-handler.ts19 symbols

Dependencies from manifests, versioned

@angular-devkit/build-angular21.0.4 · 1×
@angular-devkit/core21.0.4 · 1×
@angular-devkit/schematics21.0.4 · 1×
@angular-eslint/eslint-plugin21.1.0 · 1×
@angular-eslint/eslint-plugin-template21.1.0 · 1×
@angular-eslint/template-parser21.1.0 · 1×
@angular/animations21.0.6 · 1×
@angular/build21.0.4 · 1×
@angular/cdk21.0.5 · 1×
@angular/cdk-experimental21.0.5 · 1×
@angular/cli21.0.4 · 1×
@angular/common21.0.6 · 1×

For agents

$ claude mcp add rx-angular \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact