0.1309.0 • Published 2 years ago

@mmuscat/angular-composition-api v0.1309.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Angular Composition API

Composition model for functional reactive Angular applications.

Features

  • Small bundle size (4kb min gzipped)
  • Minimal API
  • Granular change detection
  • Better-than OnPush performance
  • Optional Zone.js
  • Observable inputs and queries
  • Reactive two-way bindings
  • Composable components, directives and services
  • Composable providers
  • Composable subscriptions
  • Lifecycle hooks
  • Computed values
  • Automatic teardown
  • RxJS interop (v6 and v7)
  • Incrementally adoptable

What it looks like

function setup() {
   const service = inject(Service)
   const count = use(0)

   subscribe(count, () => {
      service.log(count.value)
   })

   return {
      count,
   }
}

@Component({
   inputs: ["count"],
})
export class MyComponent extends ViewDef(setup) {}

Quick Start

Install via NPM

npm install @mmuscat/angular-composition-api

Install via Yarn

yarn add @mmuscat/angular-composition-api

Setup

Provide ZonelessEventManager in your root module. This is required for proper change detection in event handlers.

@NgModule({
   providers: [
      {
         provide: EventManager,
         useClass: ZonelessEventManager,
      },
   ],
})
export class AppModule {}

Api Reference

Read the docs

0.1304.0

2 years ago

0.1305.0

2 years ago

0.1304.1

2 years ago

0.1302.0

2 years ago

0.1303.0

2 years ago

0.1308.0

2 years ago

0.1309.0

2 years ago

0.1306.0

2 years ago

0.1307.0

2 years ago

0.1300.0

3 years ago

0.1301.0

3 years ago

0.1300.1

3 years ago

0.1201.0

3 years ago

0.1200.3

3 years ago

0.1200.1

3 years ago

0.1200.2

3 years ago

0.1200.0-rc.1

3 years ago

0.1200.0

3 years ago

0.1200.0-rc.0

3 years ago

0.1200.0-next.13

3 years ago

0.1200.0-next.12

3 years ago

0.1200.0-next.11

3 years ago

0.1200.0-next.10

3 years ago

0.1200.0-next.9

3 years ago

0.1200.0-next.8

3 years ago

0.1200.0-next.7

3 years ago

0.1200.0-next.6

3 years ago

0.1200.0-next.5

3 years ago

0.1200.0-next.4

3 years ago

0.1200.0-next.3

3 years ago

0.1200.0-next.2

3 years ago

0.1200.0-next.1

3 years ago

0.1200.0-next.0

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago