i want to get the value of this variable outside the function const custDetail = await registeredUser.findOne(req.params); Answer Edit a simple way to pass data to another function using res.locals router: dashboardReq nextFunction
In ProtectedRoute.js I have coded: and in App.js I have written as: Error says: [ProtectedRoute] is not a Route component. All component children of Routes must be a Route or <React.Fragment>. Is there something missing! Thank you Answer In react-router-dom custom route components are no longer used. Routes components can have only Route and React.Fragment components as children, and Route
Hello I’m new to react and got myself stuck here, my version is v6 and hence having a bit of a problem understanding, I’m following a tutorial from udemy The error that occurred is – Functions are not valid as a React child. This may happen if you return a Component instead of from render. Or maybe you meant to
For now i have two components. What i want to do is that after a successful login i will redirect the user to a homepage. But when i am trying to do that its not happening . Although the routes are changing in the url but the previous component is not going and overlapping with the new component. I have
I am Developing MERN Stack Project. The problem is when I make the first API Call the first response is undefined and the map function gives an error ‘Map is not a function and it makes sense. the problem is i tried several approaches to prevent this from happening but it won’t work This is the Code of the Component
I made a static webpage app that I have been slowly converting to React (MERN stack) to make it more dynamic/so I won’t have to configure each and every HTML document. It’s a product configurator that uses Google’s model-viewer. I’m fairly new to using a full-stack workflow but have found it pretty fun so far! I am having trouble however
simple query var MongoClient = require(‘mongodb’).MongoClient; var input = “ito”; var regexInput = new RegExp(input); //I have removed the url and db name for privacy purposes MongoClient….
I have tried many solutions given on StackOverflow as well as on other platforms but nothing worked. I am new to ReactJs and I am unable to understand what is wrong in this code that I am getting this …