Skip to content

Instantly share code, notes, and snippets.

View kishorevarma's full-sized avatar

Kishore varma kishorevarma

View GitHub Profile
@staltz
staltz / introrx.md
Last active July 15, 2024 15:43
The introduction to Reactive Programming you've been missing
@kishorevarma
kishorevarma / index.html
Last active October 18, 2016 15:00
D3 Multiple Parents Tree like graph
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style>
.node {
fill: #ccc;
stroke: #666;
node_modules
@acdlite
acdlite / coordinating-async-react.md
Last active June 17, 2024 11:56
Demo: Coordinating async React with non-React views

Demo: Coordinating async React with non-React views

tl;dr I built a demo illustrating what it might look like to add async rendering to Facebook's commenting interface, while ensuring it appears on the screen simultaneous to the server-rendered story.

A key benefit of async rendering is that large updates don't block the main thread; instead, the work is spread out and performed during idle periods using cooperative scheduling.

But once you make something async, you introduce the possibility that things may appear on the screen at separate times. Especially when you're dealing with multiple UI frameworks, as is often the case at Facebook.

How do we solve this with React?

@svetlio
svetlio / no-dbl-click-mat.directive.ts
Last active April 7, 2023 09:48
Angular 5 directive - Prevent double click for html button (no-dbl-click.directive.ts), and material mat-button (no-dbl-click-mat.directive.ts)
import { Directive, HostListener } from '@angular/core';
@Directive({
selector: '[appNoDblClickMat]'
})
export class NoDblClickDirectiveMat {
constructor() { }
@HostListener('click', ['$event'])
@thedewpoint
thedewpoint / App.tsx
Last active June 5, 2024 20:38
Auth0 with refresh tokens and expo-auth-session
import { SafeAreaProvider } from 'react-native-safe-area-context';
import * as AuthSession from 'expo-auth-session';
import { RefreshTokenRequestConfig, TokenResponse, TokenResponseConfig } from 'expo-auth-session';
import jwtDecode from 'jwt-decode';
import { useEffect, useState } from 'react';
import { Alert, Platform, Text, TouchableOpacity } from 'react-native';
import { useAsyncStorage } from '@react-native-async-storage/async-storage';
import * as React from 'react'
import * as WebBrowser from 'expo-web-browser';