Skip to content
This repository was archived by the owner on Aug 17, 2024. It is now read-only.
This repository was archived by the owner on Aug 17, 2024. It is now read-only.

Update React Router lesson #335

Open
@theseafaringturtle

Description

@theseafaringturtle

Which module(s) and week(s) does this change affect?
Module(s): React Router
Week(s): Extra classes (React) - usually needed for final projects

What is the work that needs to be done?
Router example uses react-router-dom 5.0.1, current version 6 requires a <Routes> parent for routes.
Additionally, the component={Something} syntax for routes has been replaced by element={<Something/>}, which makes it easier to pass props.

Why is this work important to do?

The current implementation we're teaching will only work in the snippets we provide and old projects. Even with older React versions, react-router-dom ^6.0.0 will still be installed.

Additional context
5 to 6 migration guide at https://github.com/remix-run/react-router/blob/f59ee5488bc343cf3c957b7e0cc395ef5eb572d2/docs/advanced-guides/migrating-5-to-6.md#relative-routes-and-links

Who might need to know about this change?
Anyone up for updating this before their class' final projects start. I'm not sure I'll have the time, so any help is welcome.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions