-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transition type needs to be imported from '@remix-run/react/dist/transition' #3866
Comments
I think Transition has to be exported here: remix/packages/remix-react/index.tsx Line 64 in d09663e
Then we can import it like we do with the Fetcher type. Work around atm for stable import would be to get the return type of type useTransition Is there a reason not to export all types from the transition file, right now the Fetcher type is the only exported type. |
Can you help me understand the use case for this? |
@kentcdodds We have a util function at Bobsled that says isSubmitting, where we pass the transition function. I'm curious also, is there a reason not to export all types? What would be against it? |
Just want to limit how much we expose. I think it's sensible to export this. Though @ryanflorence or @mjackson will need to approve it. Until then you can use |
I have a similar use case as @narutosstudent. |
I think it makes sense to export this too, but as @narutosstudent mentioned, this isn't strictly an issue since you can get the type like this (note that import { useNavigation } from "@remix-run/react";
type Navigation = ReturnType<typeof useNavigation>; |
The |
🤖 Hello there, We just published version Thanks! |
What version of Remix are you using?
1.6.5
Steps to Reproduce
Add
Transition
type to a .ts file. Only way to add the import is from '@remix-run/react/dist/transition'Expected Behavior
Ideally we don't import dist and we can import from '@remix-run/react'
Actual Behavior
To import transition, the current line is:
import type { Transition } from '@remix-run/react/dist/transition';
The text was updated successfully, but these errors were encountered: