![]() The Route component API/props changed, all the routed content is rendered on the Route component's element prop. Or you might have mixed up default and named imports."īut if you change the version, it's working fine, like in "react-router-dom": "5.2.1", This code is working fine, ,so my question is in "react-router-dom": :6.8.1 How to successfully run that code?in my App.js in code structure which thing should I have to change that code will run perfectly in 6.8.1 too? import )) Likely forgot to export your component from the file it's defined in, Provides unique URLs for different components in the app and makes the UI easily shareable with other users. Helps create and navigate between different URLs that make up your web application. Or a class/function (for composite components) but got: undefined. What is react-router-dom It is a fully-featured client and server-side routing library for react. ![]() "Element type is invalid: expected a string (for built-in components) ![]() In react I want to run an application-related react-router that is fine the problem is that specific code, such as "react-router-dom": "6.8.1," does not run in the latest react version and throws an error.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |