Skip to content

Instantly share code, notes, and snippets.

<script src="https://unpkg.com/peerjs@1.5.2/dist/peerjs.min.js"></script>
<div class="container">
<h1>CodePen P2P Tic-Tac-Toe</h1>
<div id="connection-panel">
<div class="box">
<h3>I am Host (Player X)</h3>
<p class="label">Share this ID with your friend:</p>
<div id="my-id">Generating ID...</div>
[{
"greek": "",
"english": "",
"learning-types": "",
"lessons": "",
"lesson-level": "",
"persona": "",
"words": [{
"english": "",
"greek": ""
import { useState } from "react";
import { useLocation } from "react-router-dom";
import Answer from "./Components/Answer";
import Question from "./Components/Question";
import Score from "./Components/Score";
function Lesson() {
const [answer, setAnswer] = useState("");
const [score, setScore] = useState(0);
const [questionIndex, setQuestionIndex] = useState(0);