Skip to content

Instantly share code, notes, and snippets.

View warash's full-sized avatar

Michał Majewski warash

View GitHub Profile
@jtomaszewski
jtomaszewski / rt-stateful-component.ts
Created January 11, 2019 11:05
Example implementation of StatefulComponent in Angular
// Code authored by [Recruitee](https://recruitee.com)
// License: MIT
import { Injectable, ChangeDetectorRef } from '@angular/core';
import { BehaviorSubject, Observable } from 'rxjs';
const immutableStateInvariantMiddleware = process.env.NODE_ENV !== 'production'
? require('redux-immutable-state-invariant').default
: null;
export interface RtStatefulComponent<State> {