this is my first question here and I apologize upfront if it already been answered. I’m studying react and I started a project as well, and my question is: how can I make my App component a home page? Or do I have to create a component to do so? I´m using react-router-dom for navigation, like the code below, and
Any idea on how to hide/back to its original state when selecting the links inside offcanvas using react scroll? Below is my code and also here is the sandbox code https://codesandbox.io/. App.js Header.js Content.js Im using the ff: react 17.0.2 react-router-dom 6.2.2 react-scroll 1.8.7 react-bootstrap offcanvas 2.1.2 https://react-bootstrap.github.io/components/offcanvas/ I’m not sure if I missed something like useState/useEffect or an attribute
https://codesandbox.io/s/damp-worker-k7fj6y?file=/src/App.js Why is the .row:nth-of-type(1) > .content:nth-of-type(4) .content <Link/> not displaying? Is it a bug, am I just missing something? I am not looking for an alternative approach to achieve the same result, I am simply asking why the fourth <Link/> is not displaying so I know what is going wrong. Answer Use the :nth-child psuedoselector since you are mixing
I’m trying to run this code: but somehow const navigate = useNavigate() gives me Parsing error: Unexpected token Could anyone please help me with this problem? Answer Hooks need to be called at the top level of your React functional component.
There is a problem with deleting several string parameters. Only the last parameter is being deleted now. upd: I did not specify that I wanted to achieve the ability to remove specific parameter values this code does not work correctly: Sandbox Answer Solved the problem by modifying the function like this
I’m trying to implement oauh login with react and spring boot and I’ve found a tutorial I can follow. The issue I have is that it is using React Router v4, I would like to update it to use React Router v6 and using Functional components instead. Login.js App.js This is the App.js with the routes, I have updated it
I am trying to read the code but its returning undefined. I want to read the code from the route and display it in h3 tag. The Routing The Room Component Thanks in advance Answer The route components should be passed as JSX, not as an invoked function.
I am having trouble writing code to render a login page with no navbar and sidebar. I have come across some pages that ask similar questions but none seem to pertain to my current situation. How to hide navbar in login page in react router the example given is great but I believe the way of accomplishing that same task
I have tried using
I have a parent app which contains a handler function (handleChallengeSave). The handler function triggers a useState (setSavedChallenge) in the parent. The handler function is passed down as props to …