News for hackers. Stuff that matters.
Re:How does one build large front end apps without using a f... by Our_Benefactors on Friday October 17, 2025 @09:39PM (#45624133)
> I can put that in a useMemo and it won't sort it again when the page eventually rerenders for some reason

useMemo dependency smell. This is almost always because your dependencies are wrong. This can often happen if you put a dependency as [object] instead of [object.field] due to how JavaScript maps objects to memory.

Re:How does one build large front end apps without using a f... by skydhash on Saturday October 18, 2025 @09:20PM (#45631486)
useMemo is quite nice when you're doing data transformation against some API call or other big data structure.
Re:How does one build large front end apps without using a f... by Our_Benefactors on Sunday October 19, 2025 @01:59AM (#45632292)
Yes, it is, but you still have to declare your dependencies correctly.
Re:How does one build large front end apps without using a f... by adithyassekhar on Monday October 20, 2025 @01:05AM (#45640301)
Never thought of it that way. What if it's an array though, how will I put it as a dependency?