Skip to content

Instantly share code, notes, and snippets.

View simbld's full-sized avatar
🏠
Working from home

Simon Bullado simbld

🏠
Working from home
  • Châlons-en-Champagne
  • 23:35 (UTC +01:00)
View GitHub Profile
@gaearon
gaearon / Wordle.js
Created January 22, 2022 20:49
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(() => {