News for hackers. Stuff that matters.
Re:React Concurrent Mode by nightnight on Thursday October 24, 2019 @11:36PM (#21351636)
@Dan, fyi, useTransition is already used as a hook name by the quite popular react-spring animation lib. I mean, I can migrate old code bases to import { useTransition as useSpringTransition } or I just import yours as { useTransition as useReactTransition }.

Not a big thing but also not really elegant. How would you deal with this?

Re:React Concurrent Mode by danabramov on Friday October 25, 2019 @02:30AM (#21352452)
Yeah that’s kind of unfortunate. Unintentional. I think one of us will have to rename.
Re:React Concurrent Mode by wayneftw on Friday October 25, 2019 @10:53AM (#21355576)
You only have to rename if people import each hook separately.

I prefer to use React.useWhatever(); so I don’t have to keep going to the top of the file and importing new things.

Is my preference wrong? Much of the code that I see online does not use my preference...