Skip to content

Change routing definition to support useParams, useLocation and useHistory of react-router v5.1 #38

Open
@SokichiFujita

Description

React-router v5.1 supports hooks style API which is called useParams to make path params more accessible. In order to use useParams easily, routing of App.ts|js should be changed as follows.

  • <Switch> should be placed on top of <Route> components
  • Page components should be defined as a children component of <Route>, not like <Route component={}>.

See: https://reacttraining.com/blog/react-router-v5-1/

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions