Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
[dead]
on March 22, 2025 | hide | past | favorite


[dead]


I was never able to understand what useCallback does.


Anonymous functions are not primitive values, so JavaScript passes them as pointers. React uses strict equality when comparing props, so non-primitive values are compared with pointer equality. The useCallback hook allows one to cache anonymous functions in order to pass stable pointers as props and avoid re-renders from pointers changing. It's the exact same motivation as useMemo for passing props with "stable identity".


It’s used in order to prevent redundant rerender to child components. When passing to a child component a function you’ve created inside functional component it’s get recreated because JS doesn’t keep references to a function created inside a function, thus making your child component rerender because a prop has changed.

This example actually really corresponds with this post comments, the need for useCallback have only emerged after the move from class components, because private methods you create in a class do not get recreated at each render


Prevents some re-renders when passing callbacks down the render chain, but the core flaw in modern day React is that this is added to the developer's list of things to worry about (same as memoization) and manage with the dependency array. It just feels like a lot of things that the framework should deal with and abstract away.


Yeah that's crazy that function pointers cause re-renders in React, I had no idea about this. My go-to reactivity library is SolidJS right now though, their fine-grained reactivity is really nice to work with.


its all about scope


[dead]


Do I understand correctly that for all of the above, the task results need to be verified by humans at the end?


[flagged]


He can also block your IP addr...


He's sperging about "cracking" the "SHA1 HMAC" as if that has anything to do with IP block bans.


don't feed the trolls


[flagged]


Do you get off on being annoying or something? You’re polluting every single thread here with your garbage. Please, get a fucking life.


[flagged]


[flagged]


[flagged]


No thanks. Stop spamming please.


[flagged]


The site's security works fine. But it's mathematically impossible to distinguish malicious from benign traffic in general (extensional equality of procedures is uncomputable), so we use simpler "heuristic" rules, based on our threat models.

You are able to bypass the anti-abuse mechanisms, because it is not worth making them stricter for your sake. If you are annoying enough, you'll get a special dozen-line patch, just for you. This is the most boring, pointless kind of victory I can imagine.

I've got three attacks on the HN anti-abuse mechanisms in my back pocket, but I do not use them: there is as yet no good reason for me to do so, I have better things to do, and I have some respect for other people's time.


[flagged]


Bold moving spamming in a reply to the moderator.


lmao actually, I don't think they have used this site before.


[flagged]


You're wrong about the IP bans and accounts. Once dang sees your garbage, you'll be blocked, it's not automatic. SHA1 HMAC has nothing to do with this.


Looks like the ban finally happened, he's done lol.


Anyone can make new accounts. You're being auto [flagged][dead], AKA banned.


[flagged]


Because the post is basically an advert for a $150 workshop.

And there are 2 new accounts commentating on it, just smells off.


Same weirdness vibe and formating issue too. Ok this is a new account too but I am on another device and did not find my creds on first try. I bet on the advert intention too.


[flagged]


Who hurt you


[flagged]


Lame waste of time.


You need help.


[flagged]


That's nice dear. Now, what do you want to post?


[flagged]


No one cares.


Apologizes for off-topic-ness, what's up with the various bschmidt[0-9]{3}usernames in this thread??


[flagged]


I don't believe that, blocking entire IP ranges is a fairly typical practice. What sort of proof do you have?


And why are you doing this?


[flagged]


Why do you keep doing this? Your automated messages aren’t providing a lot of value here. Are you trying to prove a point?


[flagged]


Was ist Dein verdammtes Problem, Vollspack?

Sitzt Dir ein Furz quer? Pillen alle?


[flagged]


What does any of this have to do with anything?


They're just spamming the site right now, not trying to join discussion. You can change the number in the account name to see a bunch more of it.

https://news.ycombinator.com/threads?id=bschmidt201

https://news.ycombinator.com/threads?id=bschmidt112

https://news.ycombinator.com/threads?id=bschmidt127

And so on.


[flagged]


Hard question. Don't know. Maybe require account aging before allowing posting. That's not a full solution, and it does affect signups though.


[flagged]


Upboated because I've seen this message a few times and find it interesting, a sort-of meta-relevance.

I've had enough of hn for now anyway, time to log off and go outside.


[flagged]


I think you've responded to the wrong comment


No, they responded where they meant to. They're spamming the site right now.


[flagged]


wow a hacker. he’s a hacker guys!


why do this?

> I can post whatever I want on this site and there's nothing the moderators can do about it. Their SHA1 based HMAC is easily bypassed.

What is this about? Care to explain?


Sociopathy?


[flagged]


Why tho?


[flagged]


Please stop already.


[flagged]


To what end?


Pro tip: if you don't comment on a spam post and just flag it, it gets flagged dead and people without showdead won't even see it at all (not even as [flagged]). Once you comment on it it sticks around even after being flagged, which gets better visibility for the spam than if you had ignored it.


TIL


[flagged]


You can say anything you want, yet you say nothing of importance


Exactly.

This person seems to have some serious issues :-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: