import React, { useState } from 'react'; import ReactDOM from 'react-dom'; import './style.css'; import './fonts/Bitter-Regular.woff'; import Timer from './components/Timer'; interface Solution { result: string; author: string; } const App: React.FC = () => { const [author, setAuthor] = useState('anonymous'); const [solutions, setSolutions] = useState([]); const registerResult = (result: string) => { setSolutions([{ author, result }, ...solutions]); } return ( <>

Timer

Results

    {solutions.map(solution => (
  • {solution.result} by {solution.author}
  • ))}
); }; ReactDOM.render(, document.getElementById('root'));