I have a composed page with multiple components. Like the picture, I want to show Component B inside Component A. By default, when clicking on A, hide B and show C in the middle. After clicking again, it toggles to show B and hide C. When C has been showing, also change the A’s border color. I tried to …
Tag: reactjs
My imported component seems to not be taking in my state values
here I want to invoke the MineralOutput component after the submit button and pass in the age, gender, and userid with state. This is the component that I imported. When I click the submit button, I get a 404 status code error. I’m using Axios for requests and it has already worked before when I wanted …
Uncaught (in promise) API does not exist
I’m trying to add existing backend to a new react frontend. Every time I call the API from react i get, Uncaught (in promise) API api3ceaf69c does not exist Client side code index.js aws-exports.json “aws-amplify”: “^4.3.27” Error Error screenshot I went through multiple answers …
Mouse release triggers ‘onClick’ event
Suppose I have the following React component: where #modal is the parent and #modal_content is the children. Clicking on #modal would close the modal. Because of that #modal_content stops the propogation so only clicking on #modal actually closes the modal. And now the problem: If I press down the mouse while…
change the alpha for the background color of the canvas
Hi guy i am trying to clone colol wheel picker from adobe color wheel, i am having a problem with changing the alpha for the color wheel, the code i used to generate the color wheel is referenced from here.Below is the code i use to change the alpha for the background of the canvas(default alpha is 255), but …
How to print async data in react
this is my code and print is a page and getdata is an async function that returns a promise how can I print data on the page? Answer And if data is an array of strings
Why I’m not getting latest prop value inside an event handler which I register when component mounted?
I’m creating a Counter component and passing count as a prop from the parent component. When the Counter component is mounted, I’m registering a focus event handler on the window object. Whenever the window gets focused I’m trying to print the count prop value in the console. But I’m n…
React cannot read properties of null (reading ‘map’)
I am new to React and I get the Objects are not valid as a React child (found: object with keys {id, description, status, priority, created, deadline, emp}). If you meant to render a collection of children, use an array instead. error and followed Link to solve the issue. Upon running the object with the map …
Unable to load certain images after Build in ReactJS (served with github)
I am trying to launch my website on github. After running npm run build, everything loads as expected when calling serve -s build. However when hosted on github, see website, I am unable to load the portfolio images. Strangely, I am able to access the files associated with each project. Here is my ReactJS: an…
is there a way to nest routes in react
I was wondering if there is a way to nest routes in react in that Navbar is to become the parent component of dashboard and properties Just like you would do in Vue router Answer Yes, create a layout route that renders the Navbar component and an Outlet for nested routes. Example: … If you wanted to ach…