Back to front pageView on Hacker News (opens in a new tab)Happy New Year 20251223 pointsby martynvandijke (on Hacker News)last yearHey HN, this site always drags me back to visit it everyday. So for that Happy New year !Comments (258) 159 threadsShow all commentsShowing thread 85 of 159[-]ashafqlast year3 replies#++year;[-]bdangubiclast year1 reply#don’t start the year by mutating state, geeeeeez :)[-]User23last year1 reply#It's not mutating state, it's defining a transition function from one immutable state to another!nejsjsjsbsblast year#[year, setYear] = useState(2024)Get off my lawn means no libraries, just web api.pryelluwlast year#year = year + 1insinlast year# setYear(year => year + 1) For the "get off my lawn" crew: $('#year').text(Number($('#year').text()) + 1)
User23last year1 reply#It's not mutating state, it's defining a transition function from one immutable state to another!
nejsjsjsbsblast year#[year, setYear] = useState(2024)Get off my lawn means no libraries, just web api.
insinlast year# setYear(year => year + 1) For the "get off my lawn" crew: $('#year').text(Number($('#year').text()) + 1)
Comments (258) 159 threads
Show all comments
Showing thread 85 of 159
Get off my lawn means no libraries, just web api.