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

Using both vike-react and vike-vue in the same project #1813

Open
brillout opened this issue Aug 17, 2024 · 2 comments
Open

Using both vike-react and vike-vue in the same project #1813

brillout opened this issue Aug 17, 2024 · 2 comments
Labels
enhancement ✨ New feature or request

Comments

@brillout
Copy link
Member

Description

In principle, and as stated in the documentation, it's possible to use both React and Vue (or any other UI framework) for the same project.

This should already work today when using Server Routing with a custom React/Vue integration. (To be tested.)

There are currently two limitations for using vike-react and vike-vue in the same project:

  • Vike.Config is corrupt (the declaration merging of vike-react and vike-vue are conflicting). Instead the user needs to stich the types himself.
  • When navigating between React and Vue pages, Client Routing should be disabled while falling back to Server Routing.

If you want to use both vike-react and vike-vue write a comment down below explaining why.

@vitalybaev
Copy link

Well, I would say that for me it's not a truly necessary feature, but a nice-to-have for the following reasons/use cases:

  • Long term migration. I've done some of such long going framework migration and so far the only way to achieve it is to have two separate projects and use top-level router to switch route by route from the old framework to the new one. If we had all of them in one project, we could have changed only route group between and that's it. We also could have shared styles, logic (especially with modern framework-agnostic STM) or other resources. Yes, monorepos can tackle this problem but involve additional complexity.
  • Different projects -- Though it's not and ideal scenario, but sometimes, especially in relatively big companies, different projects can be powered with different technologies and maintained by different separated teams. For example, main product on React and blog on Vue.

Regarding routing limitations -- I don't know so far how it's solved in Vike, but it can be solved the same way router knows that a particular link is external (and should be handled by regular browser navigation) or can be handled by the client side router.

And just to clarify, I wouldn't have opened this issue, if the documentation didn't claim it is possible.
For me, personally, it could have been an outstanding, but not that important feature and you should weight complexity of solving this issue. I really love Vike and think you should pay attention on most important things right now.

@brillout
Copy link
Member Author

brillout commented Sep 9, 2024

I wouldn't have opened this issue, if the documentation didn't claim it is possible.

Makes sense, I just removed it.

you should pay attention on most important things right now.

Yea, exactly, we're currently focused on the v1.0.0 release and a couple of other higher priorities. That said, providing a solution for the routing issue is very much on the radar (it's also usefull for other use cases). And the typing issue is relatively easy to solve.

(If someone needs this and is willing to sponsor, then we're definitely open to bump the priority.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants