Update README: `DataFunctionArgs` is being deprecated
Closed this issue · 1 comments
fernandocanizo commented
Hi, according to this PR from Remix, DataFunctionArgs
is being deprecated, so where the README says: "Make sure your loader and action use the new declaration format:", the example should look like:
// Old ways
export const loader: LoaderFunction = async ({request}) => {}
export const action: ActionFunction = async ({request}) => {}
export const loader = async ({request}: DataFunctionArgs) => {}
export const action = async ({request}: DataFunctionArgs) => {}
// New way
export const loader = async ({request}: LoaderFunctionArgs) => {}
export const action = async ({request}: ActionFunctionArgs) => {}
Although I don't know if there's also code to be touched before editing the documentation.
kiliman commented
Thanks for the heads up!