Skip to content

Instantly share code, notes, and snippets.

@baart1989
baart1989 / DevToolsExtension.ts
Last active June 7, 2024 05:42
Create Redux Store with redux-persist
@Injectable()
export class DevToolsExtension {
constructor(private appRef: ApplicationRef, private store$: NgReduxStore) {}
/**
* A wrapper for the Chrome Extension Redux DevTools.
*
* @argument options: dev tool options; same
* format as described here:
* [zalmoxisus/redux-devtools-extension/blob/master/docs/API/Arguments.md]
@baart1989
baart1989 / observable-store.ts
Created May 4, 2020 09:17
Simple Angular - Redux connector
import { AnyAction, Store } from 'redux';
import { BehaviorSubject, Observable } from 'rxjs';
import { distinctUntilChanged, map } from 'rxjs/operators';
import { Injectable } from '@angular/core';
import { NgZone } from '@angular/core';
export type Comparator = (x: any, y: any) => boolean;
/**