This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Loads in the AWS SDK | |
const AWS = require('aws-sdk'); | |
// Creates the document client specifing the region. Change this according to your region. | |
const ddb = new AWS.DynamoDB.DocumentClient({region: 'af-south-1'}); | |
exports.handler = async (event, context, callback) => { | |
// Captures the requestId from the context message | |
const requestId = context.awsRequestId; | |
if(event.name && event.email && event.message) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState } from "react"; | |
import "./App.css"; | |
import { useForm } from "react-hook-form"; | |
export default function App() { | |
const { | |
register, | |
handleSubmit, | |
formState: { errors }, | |
} = useForm(); |