Quantcast
Channel: XWiki Forum - Latest topics
Viewing all articles
Browse latest Browse all 1373

Choosing a library to integrate React components inside Vue

$
0
0

As the choice has been made to experiment with integrating BlockNote as a WYSIWYG editor in Cristal and XWiki in the future, and BlockNote is a React-only library, we need a way to interface React components inside Cristal which is written in Vue.

We’ve explored a few options:

  • Veaury: well-maintained, we managed to run BlockNote inside Cristal with it. It supports props interfacing, events and nested children (providing a Vue or React component as a child of a React component which is itself displayed inside a Vue component)
  • Vuera is abandoned since late 2023
  • React inside Vue is abandoned since 2023
  • React-Vue is abandoned since early 2018

As you can see, there aren’t a lot of options. The good news is Veaury seems to work nicely. It doesn’t require to set up anything globally (except a plugin in Vite), we basically import React components normally and then wrap them using an utility function that allows us to use it locally in the current Vue component.

EDIT: Also considered maintaining a Vue ↔ React bindings library for BlockNote ourselves, but the problem would be the maintenance cost in the long run. Writing the initial bindings would take quite a bit of time, and it would take even more as BlockNote’s API changes in the upcoming months / years.

If you know of any other library that could be a better option, or if you’re aware of any limitation of Veaury, please let us know :slight_smile:

7 posts - 4 participants

Read full topic


Viewing all articles
Browse latest Browse all 1373

Trending Articles