The URL changes but component is not rendered when using React Router Dom v6 route in nested page of my react application

I have a main page with a sidebar and a content displaying area which will display the selected option. The problem occurs when I try to click on the Link in sidebar, it doesn’t changes anything in the content displaying division but URL changes. If I define the routes in App.js then Link works but… Read More The URL changes but component is not rendered when using React Router Dom v6 route in nested page of my react application

MERN: Axios returns data as undefined. Probably issue with async data fetching

I am developing a MERN app which is an online bookstore. I’m using Axios for fetching data from MongoDB. The data is based on several mongoose models that are connected: Author model: firstName (string), lastName (string), etc., writtenBooks (Book model) which is an array of objects). Book model: title (string), author (Author model), etc. There… Read More MERN: Axios returns data as undefined. Probably issue with async data fetching

Trouble connecting Mongoose to MongoDB Atlas cluster: Error EREFUSED

I’m currently working on a MERN stack project and facing an issue while attempting to connect my Mongoose to MongoDB Atlas and i already set IP address to access from anywhere so,i think it’s not IP address whitelisted problem . Here’s a snippet of the code I’m using for the connection: import { connect, disconnect… Read More Trouble connecting Mongoose to MongoDB Atlas cluster: Error EREFUSED

Why does my select bar jump to the default option when the sort returns empty instead of staying the selected option?

I’m currently working with a card list in my MERN stack application that can sort cards by migration pattern and whether the current user has liked them or not. The sorting works with no issue, but when initially clicking an option that has no cards in it, while the sorting completes, the select bar jumps… Read More Why does my select bar jump to the default option when the sort returns empty instead of staying the selected option?

Where can I find the YAML file that governs my "Pages Build and Deployment" Job

Haven’t touched my repro since 2017 and I’ve forgotten where the YAML or configuration file is for "Pages Build and Deployment" job is. The Github UI doesn’t seem to point to a specific job(s) or a _config.yml that holds this together. I was hoping to share this with fledgling developer whose github set up has… Read More Where can I find the YAML file that governs my "Pages Build and Deployment" Job

Is it possible to convert a string to a reference variable name in react?

I have a reference variable: const weightInputRef = useRef(); const weightInputRef = useRef(); I have some data: const inputs = [{ ref: heightInputRef, type:’number’, placeholder: ‘Height’, name: ‘height’ }, { ref: weightInputRef, type:’number’, placeholder: ‘Weight’, name: ‘weight’ }] I am using it to setup connection between the following HTML elements: {inputs.map((item, index) => <Input name={inputs[index].name}… Read More Is it possible to convert a string to a reference variable name in react?

POST request to /api/notes/addnote endpoint returning 404 Not Found error

I’m encountering an issue when making a POST request to the /api/notes/addnote endpoint. The server responds with a 404 Not Found error. I have checked the server-side code and verified that the endpoint is correctly defined. Here are the details of my setup: Server-side: Framework/Language: Express.js Code snippet handling the /api/notes/addnote endpoint: router.post(‘/addnote’, fetchUser, [… Read More POST request to /api/notes/addnote endpoint returning 404 Not Found error