React Router

React Router

#reactrouter

Table of Contents

About

1

Chapter 1: Getting started with React Router

2

Remarks

2

Versions

2

Examples

3

Installation and Setup

3

Installation using UMD build

4

Hello World with React and React Router

4

Getting Started

6

Chapter 2: React Router 4 with TypeScript

8

Introduction

8

Examples

8

Basic routing

8

Routing with typed parameters

9

Routing with typed parameters and injected properties

10

Credits

14

About

You can share this PDF with anyone you feel could benefit from it, downloaded the latest version from: react-router

It is an unofficial and free React Router ebook created for educational purposes. All the content is extracted from Stack Overflow Documentation, which is written by many hardworking individuals at Stack Overflow. It is neither affiliated with Stack Overflow nor official React Router.

The content is released under Creative Commons BY-SA, and the list of contributors to each chapter are provided in the credits section at the end of this book. Images may be copyright of their respective owners unless otherwise specified. All trademarks and registered trademarks are the property of their respective company owners.

Use the content presented in this book at your own risk; it is not guaranteed to be correct nor accurate, please send your feedback and corrections to info@



1

Chapter 1: Getting started with React Router

Remarks

React Router is a popular and complete routing library for React.js that keeps UI in sync with the URL. It supports lazy code loading, dynamic route matching, and location transition handling, and was initially inspired by Ember's router. TODO: this section should also mention any large subjects within react-router, and link out to the related topics. Since the Documentation for react-router is new, you may need to create initial versions of those related topics.

Versions

Version Release Date 1.0.0 2015-11-09 1.0.1 2015-12-05 1.0.2 2015-12-08 1.0.3 2015-12-23 2.0.0 2016-02-10 2.0.1 2016-03-09 2.1.0 2016-04-11 2.1.1 2016-04-11 2.2.0 2016-04-13 2.2.1 2016-04-14 2.2.2 2016-04-14 2.2.3 2016-04-15 2.2.4 2016-04-15 2.3.0 2016-04-18 2.4.0 2016-04-28 2.4.1 2016-05-19



2

Version Release Date 2.5.0 2016-06-22 2.5.1 2016-06-23 2.5.2 2016-07-01 2.6.0 2016-07-18 2.6.1 2016-07-29 2.7.0 2016-08-20 2.8.0 2016-09-09 2.8.1 2016-09-13 3.0.0 2016-10-24 3.0.1 2017-01-12 3.0.2 2017-01-18 3.0.3 2017-03-28 3.0.4 2017-04-09 3.0.5 2017-04-10 4.0.0 2017-04-12 4.1.0 2017-04-12 4.1.1 2017-04-12

Examples

Installation and Setup

To install React Router, just run the npm command

npm install --save react-router

And you're done. This is literally all you have to do to install react router. Please Note : react-router is dependent on react, So make sure you install react as well. To set up: using an ES6 transpiler, like babel



3

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download