Can I access the loader function data in remix inside action Function without passing it from the form or submit function.
something like using useLoaderData inside action Function.
No. useLoaderData
and useActionData
are both hooks used by the UI component once the data is returned from the loader/action.
You will either need to pass the data to the action via FormData, URLSearchParams, or URL params.
You can also store data in session or cookies and access it from your action.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.