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

Will Remix-PWA support the move to React Router v7? #284

Open
henryStelle opened this issue Nov 30, 2024 · 36 comments · Fixed by #287
Open

Will Remix-PWA support the move to React Router v7? #284

henryStelle opened this issue Nov 30, 2024 · 36 comments · Fixed by #287
Assignees
Labels
release A new release. Or release-related. roadmap Issues planned for future development suggestion Ideas or proposals for new features or improvements

Comments

@henryStelle
Copy link

Hi,
This seems like a great package. However, it seems Remix is "taking a pause" now that all the functionality has moved to React Router v7:

Will Remix-PWA publish future versions based around React Router v7 instead of Remix?

Thanks!

@ShafSpecs
Copy link
Member

Remix PWA would support react router as well as Remix. React Router v7 is very similar to Remix, and my goal is to ensure wether you choose to use existing Remix versions, or new React router versions, Remix PWA would provide support for them

@sindras
Copy link

sindras commented Dec 16, 2024

Hi, thanks for the hard work here!

Just curious if there is a timeline in mind?

I tried remix-pwa v3 today and noticed that it was not compatible with react-router v7, because remix-pwa made assumption that remix-run/react would be installed in the project. In addition, the documentation website has not been up-to-date too: it mentions v3, and v4, but the github repo itself is in the middle of releasing v5?

As someone new to do this package, I would love to know whether v5 is almost ready, or should I give v4 a try?

@ShafSpecs
Copy link
Member

The docs also has a next section that's dedicated to v5, the docs aren't fully done yet tho. Regarding the timeline, I don't have one. React Router v7 is similar to Remix, but with a few distinctions that I need to explore

@IgnisDa
Copy link

IgnisDa commented Jan 31, 2025

Hey @ShafSpecs. Any movement on this?

@ShafSpecs
Copy link
Member

Hey @ShafSpecs. Any movement on this?

Yeah, it's been pretty slow and would be a dev release for a while, but I am working on this

@IgnisDa
Copy link

IgnisDa commented Jan 31, 2025

@ShafSpecs Is there a github branch i can try out for this?

@ShafSpecs
Copy link
Member

@ShafSpecs Is there a github branch i can try out for this?

Not yet unfortunately, I am still trying to get React Router v7 to work on my machine

@IgnisDa
Copy link

IgnisDa commented Jan 31, 2025

Maybe I can help? Can you post the error? I have it working on a new react-router app, as well as upgraded a big remix application to it.

@ShafSpecs
Copy link
Member

ShafSpecs commented Jan 31, 2025

Maybe I can help? Can you post the error? I have it working on a new react-router app, as well as upgraded a big remix application to it.

This branch (v5-rc): https://github.com/remix-pwa/monorepo/tree/v5-rc/sandboxes/rr7

I re-worked the sandbox to contain remix spa apps, normal ssr apps and a react router v7 app. The Remix apps work, but React Router throws errors for some reason

Unexpected Server Error

Error: Objects are not valid as a React child (found: object with keys {$$typeof, type, key, ref, props, _owner, _store}). If you meant to render a collection of children, use an array instead.

@IgnisDa
Copy link

IgnisDa commented Jan 31, 2025

Okay i got it working. Seems to be a problem with the sandbox being inside a workspace. Changes i made:

  • root package.json
Image
  • run touch package-lock.json && npm i in sandboxes/rr7

  • in sandboxes/rr7/app/root.tsx

Image

I suspect that this problem exists only for npm workspaces since https://github.com/remix-run/react-router-templates uses pnpm which works. and I can tell from personal experience that yarn workspaces also work.

Hope that points you in the right direction...

@ShafSpecs
Copy link
Member

Thanks for the fix @IgnisDa! Started work on reactRouterPWA plugin

@IgnisDa
Copy link

IgnisDa commented Mar 1, 2025

Hi @ShafSpecs! Any updates on this issue?

@ShafSpecs
Copy link
Member

Yeah, I'm still working on the manor PR for react router.
#287

This update would support both Remix and React Router, and then a second release would be coming after to sunset Remix support. With project renaming and a few other bonuses

@IgnisDa
Copy link

IgnisDa commented Mar 1, 2025

Great to know. Thanks for the update!

@sjbuysse
Copy link

sjbuysse commented Mar 1, 2025

I know it's not easy to do, but do you have any ballpark estimates on release date?

@ShafSpecs
Copy link
Member

ShafSpecs commented Mar 1, 2025

I know it's not easy to do, but do you have any ballpark estimates on release date?

I'm currently pretty slow 😅, but once I clear one of my freelance works (planning to wrap that up this month), I can slot this full time into my schedule

@iwan-uschka
Copy link

If there is something i (or we) can help with, let me (us) know.

@ShafSpecs
Copy link
Member

If there is something i (or we) can help with, let me (us) know.

Thanks for the offer! Currently, one of the last things remaining is lots of testing. I can push to dev later today, so it's available and you can start using (and testing real-time) on your end 👌. Most of the apis are the same, just a few changes

@ShafSpecs ShafSpecs self-assigned this Mar 2, 2025
@ShafSpecs ShafSpecs linked a pull request Mar 2, 2025 that will close this issue
@ShafSpecs
Copy link
Member

Merged the first major change, I would be pushing more fixes and features in time

@ShafSpecs
Copy link
Member

Before I go update the docs, I would push the current changes to latest.

Create a new release for react-router-pwa, remove Remix support and then go revamp the docs. Sounds good?

@ShafSpecs ShafSpecs added release A new release. Or release-related. suggestion Ideas or proposals for new features or improvements roadmap Issues planned for future development labels Mar 2, 2025
@IgnisDa
Copy link

IgnisDa commented Mar 2, 2025 via email

@ShafSpecs
Copy link
Member

The canary release is out (via the dev tag). That has been published already

@jack-r-warren
Copy link

jack-r-warren commented Mar 3, 2025

This is awesome work, truly -- the most immediate thing coming up in testing for me is @remix-pwa/[email protected] referencing @remix-run/server-runtime (not in my RR7 project) for its old json(..) utility.

vite v6.1.1 building for production...
🏗️  Building Service Worker in production mode...
x Build failed in 136ms
Error during worker build: ../node_modules/@remix-pwa/worker-runtime/dist/src/utils/response.js (1:9): "json" is not exported by "__vite-optional-peer-dep:@remix-run/server-runtime/dist/responses.js:@remix-pwa/worker-runtime", imported by "../node_modules/@remix-pwa/worker-runtime/dist/src/utils/response.js".

@remix-pwa/[email protected] seems like it has a heavier use of Remix dependencies so it's 100% possible this is user error on my part.

@ShafSpecs
Copy link
Member

I would need to fix that ASAP. Thx for the heads up

@IgnisDa
Copy link

IgnisDa commented Mar 3, 2025

To add, I also get this error while building the project:

Error during worker build: [vite]: Rollup failed to resolve import "@remix-run/react" from "/Users/diptesh/Desktop/Code/ryot/apps/frontend/node_modules/@remix-pwa/sw/dist/src/utils/installPWAGlobals.js".

This is probably due to the usage of @remix-run/react instead of react-router in packages/dev/react-router/*.

@alexfoxy
Copy link

alexfoxy commented Mar 7, 2025

Look forward to trying this, we want to make the switch.

@ShafSpecs
Copy link
Member

Opened a new PR, still making sure I don't nuke anyone's project. This PR fully sunsets Remix support fully (as dual support had so many issues)

#292

@ShafSpecs
Copy link
Member

React Router PWA v5 vs React Router PWA v1?

@IgnisDa
Copy link

IgnisDa commented Mar 7, 2025

Do you plan to rename the project to react-router-pwa? I see the package is free on npm (https://www.npmjs.com/package/react-router-pwa).

If you do plan to rename, i recommend pushing a few dummy files to that package so that it is not claimed.

@IgnisDa
Copy link

IgnisDa commented Mar 7, 2025

React Router PWA v5 vs React Router PWA v1?

I'd personally prefer v1 since the new project targets react-router and not remix. so its a new project IMO.

@ShafSpecs
Copy link
Member

Do you plan to rename the project to react-router-pwa? I see the package is free on npm (https://www.npmjs.com/package/react-router-pwa).

Yes, keeping the name Remix PWA becomes confusing in the long run. I'm also debating renaming the org or just creating another and archiving the code here. The first is the easiest, the second allows for legacy support

@sjbuysse
Copy link

any update on this? eager to give it a try in my rr7 project

@iwan-uschka
Copy link

@sjbuysse, please see @ShafSpecs's #284 (comment):

Currently, one of the last things remaining is lots of testing.

So yes, give it a try and provide feedback if you can.

@IgnisDa
Copy link

IgnisDa commented Mar 13, 2025

Do you plan to rename the project to react-router-pwa? I see the package is free on npm (https://www.npmjs.com/package/react-router-pwa).

Yes, keeping the name Remix PWA becomes confusing in the long run. I'm also debating renaming the org or just creating another and archiving the code here. The first is the easiest, the second allows for legacy support

@ShafSpecs were you able to arrive on a decision for this?

@ShafSpecs
Copy link
Member

Yep, I would try and lock down the package today. Irl is super busy at the moment. Currently getting ready to head out to the airport lol

So please, forgive my tardiness

@IgnisDa
Copy link

IgnisDa commented Mar 13, 2025

Oh no, please always prioritize your life first! Thanks for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release A new release. Or release-related. roadmap Issues planned for future development suggestion Ideas or proposals for new features or improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants