score:2
According to the React Router documents you should pass others props like onClick as bellow:
<Link to="/somestate" onClick={this.callback} className="some-classname">Click me</Link>
Also you can pass className so to shape the link as you want.
Source: stackoverflow.com
Related Query
- Call back not working when Link is clicked in react router
- Link props when passed does not work when browser back and forth is clicked React router v4
- External link not working when using LINK from react router dom
- React Router Link not updating endpoint when clicked
- React Router work on reload, but not when clicking on a link
- React Router Link is not working
- react router dom not working when changing the path
- React Router V4 Browser Back not working
- React Router not working when URL contains multiple paths
- "Res.redirect" Not Working when making Ajax call from React to Node?
- Redirect in React Router not working when I click from Users to Post
- React router No Match 404 not working when deployed?
- React Router V5 not rendering route when clicking Link, but back and forward buttons work?
- React Router v6 Link to={generateToString} not working
- PreventDefault in link in React Router not working
- React Function call not working when mapped in JSX
- Styling the active link using the NavLink component from React Router is not working as expected
- React modal is not working when call in function
- React Router Dom NavLink and Link not Working
- React router not working as expected when pass state to history.push
- React Router Link onClick redux action call not calling reducer
- Linking components in React using React Router Link not working
- Can not able to get the location state when opened with "open link in a new tab" in react router
- react router dynamic urls not working when running build
- React router not working when deployed
- React Router not working when given params
- Routes not working in react even when trying to use Routes and Router
- React router redirect not working when in function
- I'm not able to render content, when I click on React Router Link
- React setState hook is not working when trying to clear/empty/delete/set back to initial state
More Query from same tag
- Deploying Hello World react js app on to Heroku
- Delete item from list not rendering react js
- Prevent data refresh in React-Query by data hash matching
- How to recursively render React components based on a deeply nested array?
- Material-UI - understanding 10px simplification
- Adding multiple routes with react-router in an electrode app does nothing
- How to declare variable inside react function?
- How to go through multidimensionnal array from API with Reactjs
- useHooks to be used in two different ways
- Handling BackHandler
- HTML tags are not rendered while iterating over an array in ReactJS
- React Context Does Not Propagate Changes to Other Consumers After Successful Provider Update
- How to save the result of my API call to my redux store, and call my API when my component firsts loads?
- Slate.js getBlocks() in new api?
- I Don't Know why it's not work create-react-app
- why is react-player playing video even when playing={false}?
- Style a styled-components within a wrapper
- how to reduce tertiary conditionals
- Typescript/Webpack: cannot find module 'react-select'
- Link, activeClassName just plain not working
- Get value from array couses "Property 'value' does not exist on type"
- node: move files in create-react-app template to root post-install
- React on attribute change
- How to write React Tutorial in ES6 (ES2015)
- React component state persist from firebase
- What's the proper way of passing a ref to a prop?
- Trying to remove 'react-hot-loader' from final bundle using webpack ignorePlugin
- MobX vs. MobX State Tree
- REACT wait for useEffect to complete before rendering the UI
- React styled-component with Typescript, types error