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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkwMDExNjksIm5iZiI6MTcxOTAwMDg2OSwicGF0aCI6Ii81Mjc2NTU3Mi8yNzk1MjAxMTItNDA5MGZmOTEtNmNmMS00NjgwLWJjYWMtOGNiY2Q0ZDI2YzBlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIxVDIwMTQyOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRjZDc3MjNlOGI3MTcyNmViNTEyNjA2MGY4NjFlODVlZTM3MDk4NzIyZGI1MjFiNmQ4MDU4ZGIwNTNiMjNkMWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.1Ng02wQeL8F8FIUn6buH8WdNB0rzmq8X1WJZNgQg1WA)
thanks
Beta Was this translation helpful? Give feedback.
All reactions