Skip to content

Instantly share code, notes, and snippets.

View minedeljkovic's full-sized avatar

Milos Nedeljkovic minedeljkovic

  • Belgrade, Serbia
View GitHub Profile
@minedeljkovic
minedeljkovic / debugger.ts
Last active November 8, 2019 17:35
redux-devtools-extension integration for elm-ts 0.4
import * as Cmd from "elm-ts/lib/Cmd";
import * as Html from "elm-ts/lib/Html";
import { Dispatch } from "elm-ts/lib/Platform";
import * as Sub from "elm-ts/lib/Sub";
// redux is used exclusively because of https://github.com/zalmoxisus/redux-devtools-extension/issues/613
import { createStore } from "redux";
import { Subject } from "rxjs/Subject";
export interface DevToolsExtension {
(options: any): any;
import { Sub } from 'elm-ts/lib/Sub'
import { Time as Time_, now as now_ } from 'elm-ts/lib/Time'
import 'rxjs/add/operator/map'
import { Subject } from 'rxjs/Subject'
export type Time = Time_
export const now = now_
const intervals: { [interval: number]: Subject<number> } = {}
import {createStore, applyMiddleware} from 'redux';
import {createEffectCapableStore} from 'redux-side-effects';
import createLogger from 'redux-logger';
import userRegistration, {START_COUNTRY_SELECTION} from './userRegistration';
import {CHANGE_SELECTION, CONFIRM_SELECTION} from './countrySelection';
const storeFactory = createEffectCapableStore(applyMiddleware(createLogger())(createStore));
const store = storeFactory(userRegistration);
@minedeljkovic
minedeljkovic / app.js
Last active December 24, 2015 17:48
Implementing simple scenario using redux-side-effects, as a example for discussion https://github.com/rackt/redux/issues/291#issuecomment-167128155
import {createStore, applyMiddleware} from 'redux';
import {createEffectCapableStore} from 'redux-side-effects';
import createLogger from 'redux-logger';
import userRegistration, {START_COUNTRY_SELECTION} from './userRegistration';
import {CHANGE_SELECTION, CONFIRM_SELECTION} from './countrySelection';
const storeFactory = createEffectCapableStore(applyMiddleware(createLogger())(createStore));
const store = storeFactory(userRegistration);