For the best experience on desktop, install the Chrome extension to track your reading on news.ycombinator.com
Hacker Newsnew | past | comments | ask | show | jobs | submit | history | vasirian's favoritesregister

You know the joke about how when you kiss someone, you’re temporarily forming a long tube with an anus at each end? A topologist friend heard that joke and immediately offered a conjecture that that shape is topologically equivalent to the shape you’d get if you connect a mouth to an anus.

This got the party discussing if there exists a homeomorphism between making out and eating ass. I agree, you really can’t trust topologists.


Lots of people seem to misunderstand useEffect. It's not for transforming local state or for handling user events. In fact, there are many many reasons that people use useEffect for where it's not needed, and the recent React beta docs address this [0]. Their categories include:

- Updating state based on props or state

- Caching expensive calculations

- Resetting all state when a prop changes

- Adjusting some state when a prop changes

- Sharing logic between event handlers

- Sending a POST request

- Chains of computations

- Initializing the application

- Notifying parent components about state changes

- Passing data to the parent

- Subscribing to an external store

- Fetching data

Effects should also be idempotent, they should include pure functions that don't have side effects (such as doing a POST request) which Dan Abramov of the core React team addresses [1].

[0] https://beta.reactjs.org/learn/you-might-not-need-an-effect

[1] https://twitter.com/dan_abramov/status/1281669881667162112


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search:

HN For You