Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Sample of a functional components
import React from "react";
export type Choices = {
A: string
B: string
C: string
D: string
export type QuestionType = {
id: string
question: string
answer: string
choices: Choices
const SampleQuestion: React.VFC<QuestionType> = ({id, question, answer, choices}) => {
return (
<h2>正解: {answer}</h2>
export default SampleQuestion;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment