score:2
Accepted answer
navigate(".."); // to parent
navigate("../1"); // to question #
navigate("../2");
navigate("../N");
score:1
const navigate = useNavigate()
const handleClick = () => {
navigate('2')
//or
navigate('/questionaire/2')
}
Source: stackoverflow.com
Related Query
- React Router Navigate pathing
- Programmatically navigate using React router
- Programmatically navigate using react router V4
- How to navigate on path by button click in react router v4?
- react router v6 navigate outside of components
- How to navigate to another page with a smooth scroll on a specific id with react router and react scroll
- React Router v6 useNavigate() doesn't navigate if replacing last element in path
- Need to navigate link while clicking material ui table row in React Router 4
- How to nest Scene and navigate with direction='vertical' in React Native Router Flux?
- React navigate router v6 invalid hook call
- How do you pass data when using the navigate function in react router v6
- Navigate to page after authentication using React Router v4
- How do I programaticly navigate to a route from an event handler in React Router 4.0?
- React Redux with redux-observable use the router to navigate to a different page after async action complete
- React Router v4 Navigate from MobX store action?
- Programmatically navigate using react router without duplicating paths
- React Router doesn't load the new page component after redirecting via navigate
- react how to navigate router in redux-saga?
- React Router Dom (4) Programmatically Navigate
- How to navigate to a new page react router v4
- How to programmatically navigate using react router
- How can I navigate to a nested Route in React Router Dom V6
- Retrieving state from React Router v6 Navigate
- React Router Unable to navigate with Path parameters
- react router v6 how to navigate to route
- In React Router V4, how to navigate to a page outside defined basename?
- Force Navigate To Login Screen on Refresh React Router Dom
- How do I stop state store data from accumulating in a redux component every time I navigate to it using react router
- How can I configure React router correctly to navigate to a new page?
- How to navigate based on state using react router
More Query from same tag
- Removing All Elements with feature X from Array, except the latest
- Call function in child component if condition is true
- Griddle empty table when objects in fields
- React - convert object into array of objects with properties
- react-table v7 dynamic columns and rows from a json data from an api
- Styled component animation with props
- How to include NPM Module in Rails using browserify-rails
- Updating item by react useState hook
- React-router stops working when error boundary catches an error in route
- I can access my context's object, but cant update any of it's values
- Type 'MouseEvent<HTMLButtonElement, MouseEvent>' is not assignable to type 'MouseEventHandler<HTMLButtonElement>'
- how to wait redux action to completely dispatched before dispatching another action?
- Antd how to fixe the size of the multi selection component?
- How to change state in React Router Link component?
- Using the React Children code example is not working
- Different on postman and React compared to sending it through API?
- How prevent rerender of parent component in React.js
- "Cannot read property 'getEditedPostAttribute' of undefined" for InnerBlocks in Gutenberg
- how to change react-mathjax-preview font size and font in REACT JS?
- Object.entries().map() not returning with output
- Replace sub-string with React component
- Null check still throws Flow error
- Data is fetching properly but why is it not displaying?
- How do I update state to specific value?
- How do I customize Material UI in React?
- Sorting an array of objects based on the index after mapping through an array
- GitHub pages link returns blank page for React app
- How to apply css for a class in react component?
- How to access the state from the fetching action in redux-thunk?
- scrollToIndex doesn't scroll the list in React-virtualized list