Replies: 1 comment 2 replies
-
I think you want the types import type { ActionFunctionArgs, LoaderFunctionArgs } from "react-router-dom";
loader: ({request, params, context}: LoaderFunctionArgs) => { ... } react-router/packages/router/utils.ts Lines 135 to 160 in 4475b56 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
I am using the loader function every where but having to explicity type the loader param is tedious. I am wondering if I am doing it wrong or theres a way to automatically enforce the type definition automatically?
![image](https://private-user-images.githubusercontent.com/52765572/279520112-4090ff91-6cf1-4680-bcac-8cbcd4d26c0e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg4MzU2OTQsIm5iZiI6MTcxODgzNTM5NCwicGF0aCI6Ii81Mjc2NTU3Mi8yNzk1MjAxMTItNDA5MGZmOTEtNmNmMS00NjgwLWJjYWMtOGNiY2Q0ZDI2YzBlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE5VDIyMTYzNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ4ZWQ5ODcxYjFhMTRjODg1YzZkZTBmNWU3OTlhNTE3MDQxOGU4NGQ3ZjU3ZjZkMzVlZTg3MWNhZGUwMTJlMDcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.SGMfbObin2q_EswAft5a0I3R4UZnXlJ0qJMzZUloKNI)
thanks
Beta Was this translation helpful? Give feedback.
All reactions