Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Router 7 #6324

Open
tisto opened this issue Sep 25, 2024 · 0 comments
Open

React Router 7 #6324

tisto opened this issue Sep 25, 2024 · 0 comments
Assignees
Milestone

Comments

@tisto
Copy link
Member

tisto commented Sep 25, 2024

PLIP (Plone Improvement Proposal)

Responsible Persons

Proposer: Víctor Fernández de Alba (@sneridagh)

Seconder: Piero Nicoli (@pnicolli) Alok Kumar (@iFlameing)

Motivation

Volto is using currently React Router 5, which is unmantained. It is used in combination of AsyncConnect which provides support for data fetching in SSR. AsyncConnect is also ancient and no longer maintained.
Modern React Routers solve routing subjects in a more performant, efficient, and convenient way.
We should update the current React Router 5 + AsyncConnect with a modern router.

React Router 7 it's the initial choice and it was relased in Nov'24. It's the evolution from Remix so it's a mature, and React compliant solution. It also has the experience on the custom build and improvements done in Remix.

Assumptions

No assumptions.

Proposal & Implementation

React Router needs to be updated and we will opt-in to use the custom SSR server from Remix.
AsyncConnect needs to be removed, and replaced by RR7 loaders.
We will have to adapt the declaration of routes to the new routes.ts definitions in RR7, and generate the dynamic ones coming from addons, probably using @plone/registry for that.

Deliverables

Volto will be using RR7, and AsyncConnect removed from all routes.
Volto should behave as it did before.
Documentation on how to create new routes and make the transition to the new way will be provided as well.

Risks

Addons and projects relying on AsyncConnect will have to adapt to use the RR7 way of doing things.
This PLIP is targeted for Plone 7.

Participants

Víctor Fernández de Alba (@sneridagh)
Piero Nicoli (@pnicolli)
Alok Kumar (@iFlameing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants