Jacob Paris
← Back to all content

Use ActionData to get form post body in Remix

Remix allows you to handle form submissions with the action method

The response of the action method is available through the useActionData hook

import { useActionData, json } from "remix"
export const action = async ({ request }) => {
return json({
token: "1234567890",
export default function Page() {
const { token } = useActionData()
// do something with token
Professional headshot

Hi, I'm Jacob

Hey there! I'm a developer, designer, and digital nomad with a background in lean manufacturing.

About once per month, I send an email with new guides, new blog posts, and sneak peeks of what's coming next.

Everyone who subscribes gets access to the source code for this website and every example project for all my tutorials.

Stay up to date with everything I'm working on by entering your email below.

Unsubscribe at any time.