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` conflicts with React 18 `useTransition` hook

See original GitHub issue

The Problem

The useTransition hook’s name conflicts with React 18 useTransition hook, I think this needs to be changed to something else so that the Remix API stays stable and doesn’t change very often.

_Originally posted by @a7med-mahmoud in https://github.com/remix-run/remix/discussions/478_

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:10
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
ryanflorencecommented, Mar 31, 2022

Unfortunate naming collision indeed!

We’re currently going with useNavigation over in React Router as we bring over as many Remixism as we can there:

let navigation = useNavigation();
navigation.state
navigation.type
navigation.formData

When we update Remix’s dependency on the new React Router, we’ll deprecate useTransition (it’ll still work ofc) in favor of useNavigation, and in Remix v2, get rid of our useTransition.

1reaction
machourcommented, Mar 16, 2022

So sorry, doing triage and didn’t realize the other one was a discussion 😵‍💫

Read more comments on GitHub >

github_iconTop Results From Across the Web

useTransition conflicts with React 18 useTransition hook #478
The Problem. The useTransition hook's name conflicts with React 18 useTransition hook, I think this needs to be changed to something else so...
Read more >
UseTransition() Vs UseDeferredValue() In React 18
Along with concurrency, there are two new hooks introduced by React 18 known as the UseTransition() and the UseDeferredValue() hook.
Read more >
useTransition hook in React 18 - StatusNeo
This hook allows us to set lower priority on certain state updates. Since by default in react all the state updates have high...
Read more >
useTransition and useDeferredValue in React 18
These two hooks make use of React's concurrent rendering to allow developers to provide a better user experience in their applications.
Read more >
useTransition() vs useDeferredValue | React 18 - YouTube
React 18 introduces "Concurrency" - an extremely important new concept. Along with that, two key new hooks were added: useTransition () and ...
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