What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-03-06 13:20:03
get data from url using react
this.props.match.params.id Add solution -
Javascript 2021-11-14 22:47:13
react route send informaion in url
// your route setup <Route path="/category/:catId" component={Category} / > // your link creation const newTo = { pathname: "/category/595212758daa6810cbba4104", param1: "Par1" }; // link to the "location&q... Add solution -
Other 2021-11-01 16:17:10
How to pass data in Link of react-router-dom
// import React, {Component, Props, ReactDOM} from 'react'; // import {Route, Switch} from 'react-router'; etc etc // this snippet has it all attached to window since its in browser const { BrowserRouter, Switch, Route, Link, NavLink } = ReactRo... Add solution -
Javascript 2021-09-19 23:57:03
set dynamic route in link react js
<BrowserRouter> /* Links */ {heroes.map(hero => (<Link to={'heroes/' + hero.id} />)} /* Component */ <Route path="heroes/:id" component={Hero} /> </BrowserRouter> class Hero extends Component { render() { ... Add solution
Best helpers
Ranking is empty