Implementing the Ask Form

Learn to implement the ask form for our frontend.

We'll cover the following...

Now, it’s time to implement the form so that our users can ask a question. We’ll do this by leveraging React Hook Form and our form’s styled components. Follow these steps:

  1. Open AskPage.tsx and add the following import statements:

Press + to interact
import {
Fieldset,
FieldContainer,
FieldLabel,
FieldInput,
FieldTextArea,
FormButtonContainer,
PrimaryButton,
} from './Styles';
import { useForm } from 'react-hook-form';
  1. Add a type to represent the form data just above the AskPage component definition and just below the import ...