Skip to content

Instantly share code, notes, and snippets.

View desinas's full-sized avatar

Dimitrios Kalkasinas desinas

View GitHub Profile
@desinas
desinas / Wordle.js
Created February 2, 2022 13:44 — forked from gaearon/Wordle.js
wordle v3 (tiny wordle clone i built during a stream) https://www.youtube.com/watch?v=Qxn4-bTOx0g
import { useState, useEffect, useRef, useMemo } from 'react'
export default function Wordle() {
let [currentAttempt, setCurrentAttempt] = useState('')
let [bestColors, setBestColors] = useState(() => new Map())
let [history, setHistory] = usePersistedHistory(h => {
waitForAnimation(h)
})
useEffect(() => {