3 ms·
@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 { useTra
by nightnight 7y ago
@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?
- danabramov 7y agoYeah that’s kind of unfortunate. Unintentional. I think one of us will have to rename.
- wayneftw 7y agoYou 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...