how to use link to react code example

Example 1: link to react

import React, { Component } from 'react';
import { render } from 'react-dom';
import { BrowserRouter, Route, Switch, Link } from 'react-router-dom';
import { Home } from 'wherever-you-put-it/home.component.jsx';
import { Something } from 'wherever-you-put-it/something.component.jsx';
import { SomethingElse } from 'wherever-you-put-it/something-else.component.jsx';

class App extends Component {
	render() {
      return (
      	
        	
        		
        			
        		
        		
        			
        		
        		
        			
        		
        	
        	
        		Home
        		Something
        		Something Else
        	
        
      )
    }
}

render(, document.getElementById('app'));

Example 2: link tag react

{user.name}
// becomes one of these depending on your History and if the route is
// active
Michael
Michael

// change the activeClassName
{user.name}

// change style when link is active
Users

Tags:

Misc Example