Stephan de Vries’s response to How to use React-router?

Getting started with React router? Some useful basics by @Stephan281094  #JavaScript #ReactJS

  • import React, { Component } from ‘react’ import Header from ‘.
  • * will render the NotFound component when the route doesn’t match anything else.
  • /Footer’ export default class LayoutComponent extends Component { render () { return ( < div className = 'app' > < Header /> < div className = 'container' > {this.props.children} < Footer /> ) } }
  • /profile/:username will render the Profile component where the username is dynamic.
  • The LayoutComponent is a component that gets included on all pages.

Read the full article, click here.


@Hashnoder: “Getting started with React router? Some useful basics by @Stephan281094 #JavaScript #ReactJS”


Hello,
I just found react-router. I would like to know how to use it. Could someone please provide some examples, resources etc to get started with react-r


Stephan de Vries’s response to How to use React-router?