Folder Structure and useFetcher generic typing in v7 #13052
Unanswered
RSchneider94
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I'm currently experimenting with React Router v7 and have set up my project with the following structure:
home.tsx
route inside theroutes
folder, which includes a loader and default exportsHome
which is basically a return of aHomeScreen
componentapp/src/screens/Home/Home.tsx
. This folder also contains a components subfolder for screen-specific components.src
level, I've also added like aservices
folder and acomponents
folder for reusable UI components, like a styledSelect
.I was following this section of the documentation but couldn't get
useFetcher
to be properly typed inside a component located atapp/src/screens/Home/components/SelectForm/SelectForm.tsx
. There's noaction
property on Home, so I'm wondering:useFetcher
typings to work properly in this context?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions