tauri-apps / tauri-docs

The source for all Tauri project documentation.

Home Page:https://tauri.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add getting started guide for Remix SPA

mandrade2 opened this issue · comments

Describe the problem

I've been using the latest unstable Remix SPA template and i think it provides a great starting point for a modern React SPA. It is very similar to the Vite template you currently have in terms of setup. I'd like to add it to the docs and CLI. It would be fairly easy to set up.

I think it is a good starting point because:

  • It comes bundled with a router (react-router).
  • Brings file-based and config based routing.
  • Makes code splitting easy.
  • Prefetching support for route modules.
  • management via Remix APIs
  • IMO Remix being a web framework is better for beginners, as they can be better guided through their docs to achieve common web requirements. As opposed to Vite, that is build tooling with great docs but misses sections other web frameworks usually have (which of course is right, since they are not a web framework).

You can read more about remix SPA mode here.

I don't think adding the template while remix SPA mode is unstable is a good idea, but I want to get ahead and see if there's interest for this and if it gets the green light.

Describe the solution you'd like

Add a Remix in SPA mode template to the CLI and docs.

Alternatives considered

There's other solutions already provided by Tauri. Adding this could improve the bootstrapping experience though

Additional context

No response

Hi, thanks for the feature request!

Tauri's cli (i assume you mean create-tauri-app) doesn't really accept new templates right now, but the docs would be much appreciated. I will move this issue over to the docs repo :)

IMO Remix being a web framework is better for beginners, as they can be better guided through their docs to achieve common web requirements.

So i'm not sure about remix, and it's potentially unfair since it's still unstable, but at least in the context of tauri i strongly disagree with that statement. The documentation for ssr first frameworks is typically centered around ssr (or whatever it is that makes framework XY require a server) and in my experience (wearing my help desk hat) never make it clear (enough) what feature works in a client-side only project. My go-to example for quite some time now has been sveltekit (i think this was the main offender), but really, all of frameworks like this are similar in that regard (idk, nextjs, solidstart, whatever).

This is also one of the reasons we still prefer vite + base framework over any of the meta frameworks in create-tauri-app.

Thanks for moving the issue!

I think you're right. I easily imagine newcomers to the framework trying to do some server actions on their Tauri + Remix SPA desktop app with no luck. As of now, Remix docs doesn't really specifies what pages are for the fullstack or the SPA mode.

Maybe it would be better of as a suggestion for advanced users that are looking for more? But then, if you add it to the docs and mention a more advanced setup beginners could skip right there. I don't think the improvements of starting with the Remix SPA are huge, but their are definitely(personal opinion alert) a better starting point for a proper production React SPA.