I have encounter a problem with my code. I just could not figure out how to put prop inside of a string so I can use in different jsx file. Here is the code:
const TypingGame = (props) => {
const initialSentence = "banana"
I tried searing around the internet and using chatgpt but nothing worked out.
Thanks for feedback!
2
Answers
your propobly useing the wrong code
Fist thing to know that react use one-way-data flow so if you looking to send data from a parent component to a child using Props you can read it in this way