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

Upgrade Remix to react-router v7 #42

Draft
wants to merge 8 commits into
base: production
Choose a base branch
from

Conversation

timbryandev
Copy link
Owner

so long, remix namespace :(

Copy link

what-the-diff bot commented Nov 30, 2024

PR Summary

  • New TypeScript Type Definitions: The addition of new TypeScript type definitions will cater for several routes such as root, 404, 500, and sitemap.xml among others, improving the routing configuration of the application.
  • Import Updates: Changes have been made so that imports that were formerly from @remix-run/react are now importing from react-router in various component files. This is part of a switch to using the react-router library.
  • Application Routing: Replacement of RemixBrowser with HydratedRouter in the client-side entry file brings improved routing dynamics to the application.
  • Server-Side Changes: Modifications in the server-side entry file include updates from RemixServer to ServerRouter. This helps ensure a smoother transition to the react-router library.
  • Route Configuration: A new routes.ts file was added for route configuration using flatRoutes from @react-router/fs-routes, enabling more organized management of routes.

  • Import Updates: This pull request updates old imports from @remix-run/react and @remix-run/node to their react-router equivalents across multiple route files.
  • Script Modifications in Package.json: Build and development scripts are updated to use react-router commands instead of remix. This makes the application more consistent with react-router usage.
  • Dependency Switch: The Remix dependencies were replaced with React Router dependencies in package.json, further conforming to the move towards using react-router.
  • Removal of installGlobals: installGlobals from Remix was removed in the vite.config.ts, being replaced by React Router plugins which offers similar functionality.
  • Consistent use of LoaderFunction: The type import for LoaderFunction was adjusted to use React Router throughout, streamlining the type usage in the codebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant