All Projects → NetanelBasal → ngx-mobx

NetanelBasal / ngx-mobx

Licence: MIT license
Mobx decorators for Angular Applications

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to ngx-mobx

mst-effect
💫 Designed to be used with MobX-State-Tree to create asynchronous actions using RxJS.
Stars: ✭ 19 (+35.71%)
Mutual labels:  rxjs, state-management, mobx
Rxstate
Simple opinionated state management library based on RxJS
Stars: ✭ 46 (+228.57%)
Mutual labels:  rxjs, state-management
Mini Rx Store
Lightweight Redux Store based on RxJS
Stars: ✭ 32 (+128.57%)
Mutual labels:  rxjs, state-management
Bloc.js
A predictable state management library that helps implement the BLoC design pattern in JavaScript
Stars: ✭ 111 (+692.86%)
Mutual labels:  rxjs, state-management
Coderplanets web
the most sexiest community for developers, build with React, Mobx/MST, GraphQL, Styled-Components, Rxjs, Ramda ... and ❤️
Stars: ✭ 314 (+2142.86%)
Mutual labels:  rxjs, mobx
Focal
Program user interfaces the FRP way.
Stars: ✭ 613 (+4278.57%)
Mutual labels:  rxjs, state-management
Store
Aurelia single state store based on RxJS
Stars: ✭ 103 (+635.71%)
Mutual labels:  rxjs, state-management
ngx-model-hacker-news-example
Example repository with Hacker News implementation using Angular, Angular Material & ngx-model
Stars: ✭ 27 (+92.86%)
Mutual labels:  rxjs, state-management
Ayanami
🍭 A better way to react with state
Stars: ✭ 129 (+821.43%)
Mutual labels:  rxjs, state-management
Reactive State
Redux-clone build with strict typing and RxJS down to its core. Wrist-friendly, no boilerplate or endless switch statements
Stars: ✭ 135 (+864.29%)
Mutual labels:  rxjs, state-management
Model
Angular Model - Simple state management with minimalist API, one way data flow, multiple model support and immutable data exposed as RxJS Observable.
Stars: ✭ 242 (+1628.57%)
Mutual labels:  rxjs, state-management
Fluorine
[UNMAINTAINED] Reactive state and side effect management for React using a single stream of actions
Stars: ✭ 287 (+1950%)
Mutual labels:  rxjs, state-management
Akita
🚀 State Management Tailored-Made for JS Applications
Stars: ✭ 3,338 (+23742.86%)
Mutual labels:  rxjs, state-management
Platform
Reactive libraries for Angular
Stars: ✭ 7,020 (+50042.86%)
Mutual labels:  rxjs, state-management
reactive-store
A store implementation for state management with RxJS
Stars: ✭ 29 (+107.14%)
Mutual labels:  rxjs, state-management
Sigi
Well designed effect management framework for complex frontend app
Stars: ✭ 95 (+578.57%)
Mutual labels:  rxjs, state-management
juliette
Reactive State Management Powered by RxJS
Stars: ✭ 84 (+500%)
Mutual labels:  rxjs, state-management
rxdeep
rxjs deep state management
Stars: ✭ 47 (+235.71%)
Mutual labels:  rxjs, state-management
React Eva
Effects+View+Actions(React distributed state management solution with rxjs.)
Stars: ✭ 121 (+764.29%)
Mutual labels:  rxjs, mobx
vuse-rx
Vue 3 + rxjs = ❤
Stars: ✭ 52 (+271.43%)
Mutual labels:  rxjs, state-management

Build Status Commitizen friendly semantic-release Awesome

Mobx decorators for Angular Applications (live example)

Installation

npm install ngx-mobx
yarn add ngx-mobx

Usage

  • fromMobx - RxJS bridge from Mobx computed function
class TodosStore {
  @observable todos: Todo[] = [new Todo('One')];
  
  @action addTodo(todo: Todo) {
    this.todos = [...this.todos, todo];
  }
}

@Component({
  selector: 'app-todos-page',
  template: `
   <button (click)="addTodo()">Add todo</button> 
   <app-todos [todos]="todos | async"   
              (complete)="complete($event)">
    </app-todos>
  `
})
export class TodosPageComponent {
  todos : Observable<Todo[]>;

  constructor( private _todosStore: TodosStore ) {}
  
  ngOnInit() {
                                                        // true by default
    this.todos = fromMobx(() => this._todosStore.todos, invokeImmediately);
  }

  addTodo() {
    this._todosStore.addTodo({ title: `Todo ${makeid()}` });
  }
}
  • CleanAutorun with autorun - autorun decorator which cleans itself as soon as the component is destroyed
import { CleanAutorun, autorun } from 'ngx-mobx';

@CleanAutorun
@Component({
  selector: 'todos',
  template: `...`
})
export class TodosPageComponent {

  @autorun
  ngOnInit() {
    this.todos = this.todosStore.todos;
  }

  ngOnDestroy() {}
}

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].