Buckets:
| "use client"; | |
| import { useState } from "react"; | |
| import { analytics } from "@/lib/segment"; | |
| export default function Form() { | |
| const [message, setMessage] = useState(""); | |
| const handleSubmit = (e: React.FormEvent) => { | |
| e.preventDefault(); | |
| analytics.track("Form Submitted", { | |
| message, | |
| }); | |
| setMessage(""); | |
| }; | |
| return ( | |
| <> | |
| <form onSubmit={handleSubmit}> | |
| <label> | |
| <span>Message:</span> | |
| <textarea | |
| onChange={(e) => setMessage(e.target.value)} | |
| value={message} | |
| /> | |
| </label> | |
| <button type="submit">submit</button> | |
| </form> | |
| <style jsx>{` | |
| label span { | |
| display: block; | |
| margin-bottom: 12px; | |
| } | |
| textarea { | |
| min-width: 300px; | |
| min-height: 120px; | |
| } | |
| button { | |
| margin-top: 12px; | |
| display: block; | |
| } | |
| `}</style> | |
| </> | |
| ); | |
| } | |
Xet Storage Details
- Size:
- 943 Bytes
- Xet hash:
- 8bd8eea5ebc0063cd6cf94b6801decea8b90258eee76c4b036a11b3b393d20bc
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.