Skip to content

Instantly share code, notes, and snippets.

@raveclassic
raveclassic / react-context-hooks-mvvm-demo.ts
Created February 28, 2020 11:30
React Context Hooks MVVM demo
import { fold, pending, RemoteData } from '@devexperts/remote-data-ts';
import { constNull } from 'fp-ts/lib/function';
import { createElement, memo, useEffect, useMemo, useState } from 'react';
import { pipe } from 'fp-ts/lib/pipeable';
import { LiveData } from '@devexperts/rx-utils/dist/live-data.utils';
import { newSink, Sink } from '@devexperts/rx-utils/dist/sink2.utils';
import { Context, context } from '@devexperts/rx-utils/dist/context2.utils';
import { observable } from '@devexperts/rx-utils/dist/observable.utils';
import { distinctUntilChanged, share, switchMap } from 'rxjs/operators';
import { render } from 'react-dom';
@slav123
slav123 / loop.less
Created October 7, 2013 02:37
working loop's in LESS
@iterations: 30;
.loopingClass (@iterations);
// helper class, will never show up in resulting css
// will be called as long the index is above 0
.loopingClass (@index) when (@index > 0) {
~.ico@{index} {
// your resulting css