Skip to content

Instantly share code, notes, and snippets.

Furiously Coding

Aashish Chaubey aashish-chaubey

Furiously Coding
View GitHub Profile
aashish-chaubey / Todo.js
Created Jul 11, 2019
Making use of `useReducer` React hook for managing the state of the functional component
View Todo.js
import React, { useReducer } from 'react';
const reducer = (state, action) => {
switch(action.type) {
case 'add': {
return [
text: '',
aashish-chaubey /
Last active Dec 9, 2018
Creating threads in python using threading module
from threading import Thread
import time
def job(name):
# Create a process heavy job
print("The name is: %s" % name)
def main():
print("Program starts!")