useTransition hook name already exits in the ecosystem
See original GitHub issueThe new concurrent mode provides a new hook - useTransition
. However the name of it is confusing. The word “transition” in web development already refers to animations and css transition property. There also exist useTransition hook provided by react-spring library. So people who will use both concurrent mode and react-spring in their projects will be confused by clashing names.
Did you consider different names for concurrent transitions? For example, useTransaction
is not present in the ecosystems and can be used to describe concurrent updates.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:14
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Concurrent UI Patterns (Experimental) - React
We will need to use this Hook's return values to set up our state transition. There are two values returned from useTransition :...
Read more >Don't Stop Me Now: How to Use React useTransition() hook
In this post, you'll learn how to use useTransition() hook to mark UI updates as low priority, which is especially useful for heavy ......
Read more >Migrating your React Router App to Remix
If your existing app uses a directory with the same name, rename it to something like src or old-app to differentiate as we...
Read more >React v18.0.0 Release - GitClear
useId is a new hook for generating unique IDs on both the client and server, while avoiding hydration mismatches. It is primarily useful...
Read more >React Suspense in Practice | CSS-Tricks
This would cause the entire existing UI to un-render, and the fallback to ... To support this, React provides a second API, useTransition, ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@FredyC
I proposed
useTransaction
in my initial comment. It fits into my mental model of concurrent mode pretty wellAll this just came to my mind:
useParallelUniverse
🙈 (from docs examples)useConcurrentTransition
(too long?)useTransit
🤔useFork
(it refers to a “forked” tree)useConvergence
useStage
(like staged environment)The naming
useTransition
may make sense but there is alsoreact-transition-group
besidesreact-spring
, you may end up with:React.useTransition
Spring.useTransition
RTG.Transition
Also, what about tree shaking on an existing lib without side-effects that may already include
useTransition
?, doing thisimport * as Lib from 'lib'
may cause all exports to be included (Yes, you can aliasimport { useTransition as useBlabla } from '...'
but that’s not the point)