我在reactjs中创建一个测验,我的数据看起来像
Data.js
{
category: "General Knowledge",
question: "Virgin Trains, Virgin Atlantic and Virgin Racing, are all companies owned by which famous entrepreneur? ",
answers: [
"Alan Sugar",
"Donald Trump",
"Bill Gates",
"Richard Branson"
]
},
用户提交表单后如何将输入的单选按钮与存储所有正确答案的另一个文件进行比较?
Answers.js
[ { "answer": 3 } ]
我正在使用ReactJs和Redux