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'));
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 |
React Router Global 404 | 3,443 Kb |
StaticRouter | 1,966 Kb |
Prompt Test | 3,925 Kb |
RRC wrapSwitch | 2,922 Kb |
A Simple React Router v4 Tutorial | 4,282 Kb |
Update with search | 2,275 Kb |
React Router Template | 1,760 Kb |
React Router with Redux | 4,033 Kb |
A Pen by Paul Sherman | 2,254 Kb |
NavLinks | 2,391 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 |
Social.svg.min | Larsenwork | 13,849 Kb |
Calculator - codevember 08 - 2016 | Caiocares | 3,260 Kb |
Form Labels | Bartuc | 2,717 Kb |
Side Sliding Menu CSS | EduardL | 4,388 Kb |
CSS Variables | Jdsteinbach | 4,759 Kb |
Hover Animation from UNIQLO | Insprd | 3,772 Kb |
Fixed Scrolling Nav Bar | Philsinatra | 0 Kb |
Scroll effect with text with help from Skrollr | Luxonglassing | 2,935 Kb |
Project MMetro beta | Atomicsong | 5,157 Kb |
Sinclair Research Computers | MattCowley | 3,068 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!