<p>Then in my <code>Index</code> component, I access the data from the loader hook with <a href="https://remix.run/docs/en/v1/api/remix#useloaderdata">useLoaderData()</a>, and my component is now hydrated with that data. In MVC style of thinking, think of the loader hook as the controller processing the page load request, populating with data from the model, and then passing to the view.</p>
<p>The great part about Remix is that this doesn’t have to be specifically a GraphQL request. This data can come from anywhere. The <a href="https://remix.run/docs/en/v1/tutorials/jokes">Jokes tutorial</a> in the Remix docs even thoroughly walks through how you can manage all this data in <a href="https://www.prisma.io/">Prisma</a>.</p>
<h2>Processing User Input (aka Actions)</h2>
<p>Ok great, so we’ve got data onto the page, but now we need to be able to handle user input. Remix also provides an <a href="https://remix.run/docs/en/v1/api/conventions#action">action hook</a> to process an action request (ex: a form submission). In my case, I have a contact form that sends me an email via SendGrid after submission.</p>