shellscape / jsx-email

Build emails with a delightful DX
https://jsx.email
MIT License
961 stars 31 forks source link

fix(cli): use react-router-dom `Link` component in preview #35

Closed devjmetivier closed 11 months ago

devjmetivier commented 11 months ago

Component / Package Name:

This PR contains:

Are tests included?

Breaking Changes?

If yes, please include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.

List any relevant issue numbers:

Description

Previously, the Preview app from the CLI had an issue with seeing FOUC or a white screen when navigating between email templates. This occurred because the project uses react-router-dom, but was not using its Link component to navigate.

This caused the entire unmount/mount of the React tree when clicking a link to another template (because it was fetching a completely new page).