Matching Routes
How do I make an matching routes?
What is a matching routes? How do you make a matching routes? This script and codes were developed by Paul Sherman on 10 November 2022, Thursday.
Matching Routes - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Matching Routes</title>
</head>
<body> <div id='root'></div> <script src='https://cdnjs.cloudflare.com/ajax/libs/react/15.4.2/react.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/react/15.4.2/react-dom.min.js'></script>
<script src='https://unpkg.com/[email protected]/umd/react-router-dom.js'></script> <script src="js/index.js"></script>
</body>
</html>
Matching Routes - Script Codes JS Codes
'use strict';
var _ReactRouterDOM = ReactRouterDOM;
var HashRouter = _ReactRouterDOM.HashRouter;
var Route = _ReactRouterDOM.Route;
var Link = _ReactRouterDOM.Link;
var Switch = _ReactRouterDOM.Switch;
var App = function App() { return React.createElement( HashRouter, null, React.createElement( 'div', null, React.createElement( 'ul', null, React.createElement( 'li', null, React.createElement( Link, { to: '/' }, 'Home' ) ), React.createElement( 'li', null, React.createElement( Link, { to: '/about' }, 'About' ) ), React.createElement( 'li', null, React.createElement( Link, { to: '/other' }, 'Other' ) ) ), React.createElement( Switch, null, React.createElement(Route, { exact: true, path: '/', component: function component() { console.log("RENDER HOME");return React.createElement( 'div', null, 'Home' ); } }), React.createElement(Route, { path: '/about', component: function component() { console.log("RENDER ABOUT");return React.createElement( 'div', null, 'About' ); } }), React.createElement(Route, { component: function component() { console.log("RENDER 404");return React.createElement( 'div', null, '404' ); } }) ) ) );
};
ReactDOM.render(React.createElement(App, null), document.getElementById('root'));
![Matching Routes - Script Codes](http://shots.codepen.io/pshrmn/pen/yMaPjE-512.jpg)
Developer | Paul Sherman |
Username | pshrmn |
Uploaded | November 10, 2022 |
Rating | 3 |
Size | 2,240 Kb |
Views | 16,192 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
RRC wrapSwitch | 2,922 Kb |
React Router Global 404 | 3,443 Kb |
Update with search | 2,275 Kb |
React Router Template | 1,760 Kb |
RRv3 Walk | 2,991 Kb |
Matching Routes | 2,240 Kb |
NavLinks | 2,391 Kb |
CSSTransitionGroup Example | 3,255 Kb |
A Simple React Router v4 Tutorial | 4,282 Kb |
A Pen by Paul Sherman | 2,254 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Gears | Synvox | 3,278 Kb |
FCC Portfolio | Cmwebby | 4,304 Kb |
Base-Style | Daniel_gooss | 2,614 Kb |
Board Site | IndianaLuft | 10,542 Kb |
This in constructor context | _shree33 | 1,718 Kb |
Snow collision | Wojtek1150 | 3,542 Kb |
Simple blog concept | Drew_mc | 2,666 Kb |
Pure CSS Tooltips | Mobius1 | 2,271 Kb |
Promodoro | Bencarp | 1,712 Kb |
About Mazano | Kiti | 2,585 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!