Skip to content

Instantly share code, notes, and snippets.

View BinodNagarkoti's full-sized avatar
💭
I may be slow to respond.

Binod Nagarkoti BinodNagarkoti

💭
I may be slow to respond.
View GitHub Profile
//useCounter.tsx
import { useState } from 'react';
function useCounter(initialValue = 0) {
const [count, setCount] = useState(initialValue);
const increment = () => setCount((prevCount) => prevCount + 1);
const decrement = () => setCount((prevCount) => prevCount - 1);
const reset = () => setCount(initialValue);
@BinodNagarkoti
BinodNagarkoti / cloudSettings
Last active December 10, 2020 13:33 — forked from bradtraversy/eslint_prettier_airbnb.md
ESLint, Prettier & Airbnb Setup
{"lastUpload":"2020-12-10T13:33:33.801Z","extensionVersion":"v3.4.3"}