If you ever come across this error in your React project:
Error: A is only ever to be used as the child of element
Your project has react-router-dom version 6. In version 6, you will need to wrap all Route components into a Routes component..
Here is an example:
}/> }/> }/>
However, you can always revert to version 5.
That is it!