React Router (v6) - GitHub Pages

React Router (v6)

Applications have more than one page¡­

Fulvio Corno

Luigi De Russis

Enrico Masala

Applicazioni Web I - Web Applications I - 2021/2022

Outline

? Objective and problems

? A Solution, the React way: React Router

2

Applicazioni Web I - Web Applications I - 2021/2022

Full Stack React, chapter ¡°Routing¡±

React Handbook, chapter ¡°React Router¡±

Multi-page Single Page Applications

OBJECTIVES AND PROBLEMS

3

Applicazioni Web I - Web Applications I - 2021/2022

Supporting Complex Web Applications

? Switching between many different page layouts

? Managing the flow of navigation across a set of ¡°pages¡±

? Maintaining the default web navigation conventions (back, forward,

bookmarks, ¡­)

? Allowing URLs to convey information

? Avoiding to re-load KBs of JavaScript at every page change

? Keeping the state across page changes

? ¡­

4

Applicazioni Web I - Web Applications I - 2021/2022

Example

/

/profilename

/pages/?category=your

_pages

/pagename

? Different layout

and contents

? Some common

parts

? No ¡°page reload¡±

? URL changes

accordingly

5

Applicazioni Web I - Web Applications I - 2021/2022

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

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

Google Online Preview   Download