Resolved: React language issues with it’s versions

In this post, we will see how to resolve React language issues with it’s versions

Question:

I am learning to react. I found that I need to install some package to use anything. Does React and Node installation comes empty [No library as we have in Java]?
I am using react-router and react-router-dom version 6.8.0 so that “Routes” can work properly. To use {withRouter}, I need to downgrade the version to 5.2.0.
If I do that, then “Routes” don’t work.
Any clarification on how to use React as a front-end language? Or Angular or another language is better?
Here is the code. I want to move to Restaurants1.js from SearchWindow.js on clicking some link.
App.js:
SearchWindow.js:
Restaurants1.js:
Not able to get value of param1 in Restaurants1.js.

Best Answer:

So, finally, solved.
Restaurant1.js:
withRouter.js:
SearchWindow.js:

If you have better answer, please add a comment about this, thank you!

Source: Stackoverflow.com