score:0
Accepted answer
The point of using react-router
is to render components depending on the url
. If you are planning to open the page on a new link just use a regular a
element.
const { groupId, unitOffering, userId, role, selectedGroup } = this.state;
const path = `/AssessmentList?groupId=${groupId}&unitOfferingId=${unitOfferingId}&userId=${userId}&role=${role}&groupName=${selectedGroup.group_name}`;
return (
<a
href={path}
target="_blank"
rel="noopener noreferrer"
style={{ textDecoration: "none", color: "white" }}>
Mark
</a>
);
Source: stackoverflow.com
Related Query
- Adding target=_blank to link tag in button in react does not open new page but disables it?
- How does React or Next make their <a> tag not reload the page but content loads?
- My React 18 app does not reload automatically I try to click on the create new project button does not work unless I refresh the page manually
- <a> tag goes to new page, but does not go to the top of the new page
- React Link changes URL but does not render page
- Adding new DOM items with React in Chrome does not keep expected scroll position
- React Router v5: history.push() changes the address bar, but does not change the page
- URL changes but page new page is not rendered Ionic React , IonReactRouter with history
- React Router - Open Link on new Tab and Redirect to Home Page
- Why does my react app go to the custom 404 not found page when the link is clicked?
- React reach router link tag updates url but not the component
- React Router Link with params not reloading page with new data from componentDidMount and Redux axios data fetching
- React Query return undefined data while in network tab the data exists but it does not show on the page
- The written link and condition is correct but the page does not move
- React Router issue. Whenever login button is clicked. I am directed to a blank page with the homepage link appended to the login page link is made
- Open new page on click of button in react
- Adding React Router returns me a blank web page not working
- How to open React component as new page from a button in different component
- React 16 Hidden button Modal does not open on click
- link changes but page does not
- React form not submitting when using button nested inside Link tag
- React Router Dom & Firebase Auth: history.push changes url but does not render new component when called after firebase auth create account
- react router: pressing back button does not bring user back to previous page
- React router dom v5 history.push does not render new page
- New to React, I am trying to link 2 pages, it does not render but the path is displayed in the browser
- onclick of my submit button, the array stored in localstorage does not add the new item but is replaced while using react
- In my react app, url updates but the page does not redirect until browser refresh
- react router dom, replaces the browser url but does not go to the page
- React Hooks: Adding new fields to an Object state does not get reflected immediately
- Importing New React Component Compiles But Does Not Render
More Query from same tag
- Unable to manipulate the DOM in a React component
- Login React + Express + mongoDB doesn't work properly
- static video url for videojs in reactjs is playing but not url coming dynamically from database
- Getting one of the object value/state inside of an array
- Determing if a value in an array is in the past, present or future
- tab key press ignore hidden area a & button elements
- Default value with react-select, checkboxes not working when I want to post my data having a blank page output
- How to customize label color of material ui Textfield when out of focus?
- What are refs in React?
- I am getting "Invalid hook call" error after using useState in my project
- react show button on mouse enter
- React Bootstrap - 'openModal' is not defined no-undef
- React - when to call react as a variable vs import react
- How do i access another column from related table other than the foreign key, when creating an API view
- ReactJS - Using setTimeout() with if/else statement
- Cannot connect apollo client to aws appsync
- react variabels are not showing in render, but after reload they do, what is going wrong
- What is debug in package.json file?
- TypeError: Cannot read properties of undefined (reading 'setPopup')
- How to pass through class delared in variable into ClassName with react js?
- Radio button with dynamic value from input as label
- React: Script tag not working when inserted using dangerouslySetInnerHTML
- React type error "not assignable to parameter of type 'never'"
- Redux Thunk return dispatch not working
- Make MUI dialog content size follow the size of the content
- Mapping from JSON Get Request. Undefined
- Rails api react and nginx on docker
- React: Rendering a method defined inside arrow function?
- React seems to be escaping HTML before rendering in the browser causing it to appear as code in the page
- `TypeError: Cannot read property 'ballDepth' of undefined