Replies: 2 comments 6 replies
-
|
I have now created a package for this. Not battle tested, and documentation is coming soon. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
This looks great, I had a little experiment with this a while back: https://domchristie.co.uk/posts/turbo-native-without-turbo/ |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
While Hotwire native was born as a native counterpart of Turbolinks and now Hotwire native, I think it can be tweaked a bit to work with any web framework. This is in accordance to the rails doctrine "Push up a big tent". While hotwire turbo is a really simple and effective way to build web apps, most people are building web apps with React/Vue/Svelte. The larger industry can benefit from making Hotwire Native available for them.
The sequence diagram of web and native as I understand looks somewhat like this.
Any web framework or even a vanilla JS implementation which follows that contract should be able to build a hotwire native app. As a proof of concept, I recreated the hotwire demo site using SvelteKit and made it work with Hotwire Native - https://sk-hotwire-native-demo.vercel.app/. I only tested on iOS, but it seems to work fine for the usual use cases.
The POC code is at https://github.com/jaysson/sk-hotwire-native-demo/blob/main/src/hooks.client.ts in case anyone wants to take a look at. Warning: it's in typescript and is just a proof of concept 😛.
Since 37signals doesn't use other frameworks, I understand the maintainers of Hotwire may not be interested in explicitly supporting any other frontend framework. That's fair. I am only proposing the following:
I can contribute PRs if this sounds good.
Beta Was this translation helpful? Give feedback.
All reactions