question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

useTransition hook name already exits in the ecosystem

See original GitHub issue

The 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:closed
  • Created 4 years ago
  • Reactions:14
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

9reactions
just-boriscommented, Oct 29, 2019

@FredyC

However, I don’t really have a better one. Does either one of you have some idea?

I proposed useTransaction in my initial comment. It fits into my mental model of concurrent mode pretty well

3reactions
eddywcommented, Nov 5, 2019

Does either one of you have some idea? Let’s provide constructive criticism, please.

All 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 also react-transition-group besides react-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 this import * as Lib from 'lib' may cause all exports to be included (Yes, you can alias import { useTransition as useBlabla } from '...' but that’s not the point)

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found