我可以在 remix.run 的 Action 函数中访问 Loader 数据吗?

Can i access Loader data in Action function in remix.run?

我可以在 remix inside action Function 中访问加载程序函数数据,而无需从表单或提交函数传递数据吗?

类似于在 action 函数中使用 useLoaderData。

没有。一旦数据从 loader/action.

返回,useLoaderDatauseActionData 都是 UI 组件使用的钩子

您需要通过 FormData、URLSearchParams 或 URL 参数将数据传递给操作。

您还可以将数据存储在会话或 cookie 中,并从您的操作中访问它。