Gatsby: Vue Support

Created on 11 Jan 2019  路  12Comments  路  Source: gatsbyjs/gatsby

Summary

Please add Vue support. Heart emoji. Praying hands emoji. Trollface emoji but not really.

Basic example

Example is the same as your examples but _computed properties_ are dope and super great animation capabilities like transition modes. I would make demos for you. They would be slick.

Motivation

Imagine appealing to both React and Vue audiences and expanding your reach. By a LOT.

Most helpful comment

Not impossible or unreasonable, an investment. Besides, never hurts to ask.

All 12 comments

Just had to express my support and enthusiasm for this idea. Would be happy to help out in whatever way I can!

You can try out Gridsome.

@sdras pretty impossible as you can imagine, because gatsby not just uses react it is entirely based on react. so you basically would need to recreate the entire project to work with vue and in the end you would have to maintain both projects separately.

Ionic supports React, Vue, Angular, and Stencil so it's certainly not "impossible" for a project to support React and Vue at the same time. As with everything development it's a matter of priorities and cost:benefit.

@abraham yeah the huge difference is that ionic is built as framework agnostic and gatsby a framework built on react. of couse it is not impossible but not very reasonable either.

Not impossible or unreasonable, an investment. Besides, never hurts to ask.

Ionic 4 is framework agnostic, but before that it was exclusively Angular.

Not impossible or unreasonable, an investment. Besides, never hurts to ask.

Agreed. I'd also put the thought out there that even inviting a small team of OSS maintainers to help build out the Vue version is an option as well if the core team does not have resources to devote a lot of time to it.

@sdras thanks so much for opening this. As @jlengstorf said, we 馃挏 Vue, and certainly want _as many_ people using Gatsby as possible.

That said -- there is a maintenance cost for this, and I do worry that even if technically we _could_ build this out (and we certainly could), it'll be challenging to maintain these disparate functionalities side by side particularly when developing new features. This does not mean it's impossible, just that it's challenging and there are some significant trade offs here. Additionally, my co-worker @wardpeet raises a really good point that this introduces the potential for a _very confusing_ user experience. If the user wants to use gatsby-plugin-styled-components there's really no indication whether it works for React or Vue--and I think this could introduce a large potential for breakage and confusion.

These are not intractable problems, but we want to ensure that we're keeping these considerations in mind if we were to build something like this out!

@abraham yeah, Ionic (and Stencil) are both super cool. I don't think web components are a great fit for what we're doing here--but the framework agnostic nature certainly (in theory) is super appealing. Something to keep an eye on for sure.

Sounds good. I figured, but worth asking. I see your team growing with some amazing people so some of the curiosity was towards that kind of investment- where Gatsby might head in the future. It's probably worth mentioning that quite a lot of people have asked me if Gatsby does or ever will support Vue, but I'm sure you're also asked about a lot of other things as well that are untenable, you can't do everything. If you ever do want to head in that direction, let me know. As mentioned, I'd contribute some demos of the capabilities. Cheers! 鉂わ笍

After taking a look at Gatsby and Gridsome, I am wondering why we are reinventing the wheel for vue currently. I think it might be promising to bring those projects closer together and benefit from each other. Then I found this issue.

Image there is a common base project which handles the internal graphql layer, speaking to different sources and transforming content. Then there are adapters for different languages or frameworks like vue, react or whatever. So you have a graphql layer, adapter, source and transformer plugins. This might also make it easier to integrate gatsby into existing projects step by step.

Do you have any hints on how to get started using the graphql-source-layer only? I think about creating something like gatsby source which will spin up a graphql server which I can speak to.

I鈥檝e just been trawling through the Gridsome plugins and connectors and had also been thinking the same thing as @ChristophWalter - conceptually it seems like the GraphQL layer could provide an abstraction point where the frontend theming layer could be implemented in any framework, allowing all the data connectors at the very least to be reused. Obviously a lot of work, but given the massive lead Gatsby has in building out this ecosystem it seems like the ideal project to take this on!

Was this page helpful?
0 / 5 - 0 ratings