Closed mlava closed 4 months ago
Do write this inside any functional component.
export default mycomp() {
const [score, setScore] = useState(0);
return (
<CrosswordProvider data={crossword} onAnswerCorrect={() => setScore(score + 1)}>
<DirectionClues direction="across"/>
<DirectionClues direction="down" />
<CrosswordGrid />
</CrosswordProvider>
)
}
Do let me know if you need any further assistance
Thanks very much @CodeDecree I will experiment and see how it goes. Cheers!
Hi there, Sorry to be a noob, but would someone please mind sharing some code showing how to access and use these methods? I searched through the examples, but couldn't see anything that made sense. Thanks in advance!