akxcv/vuera

makeReactContainer: TypeError: Component is undefined

rmeissn opened this issue · 1 comments

I'm trying to use Ontodia (a react/typescript component) in my vue application by leveraging vuera.

I tried all three ways (VuePlugin, ReactWrapper and ReactInVue), but I received the same error message for all three:

Bildschirmfoto von 2019-09-24 15-34-49

My code looks like this:

<template>
  <div>
    <oontodia/>
  </div>
</template>

<script>
import Ontodia from 'ontodia'
import { ReactInVue } from 'vuera'

export default {
  name: 'ontodia',
  components: { oontodia: ReactInVue(Ontodia) }
}

I'm not entirely sure whether this is a Ontodia or Vuera issue, cause the Ontodia documentation is very sparse: https://github.com/metaphacts/ontodia/wiki/Embedding#using-ontodia-as-npm-dependency

Edit: That's the minimal React code to get Ontodia to reveal: https://jsfiddle.net/yf8jg0k0/25/ - I'm not entirely sure how to do this with vuera.

Nevermind, it was my fault. I needed to import Ontodia like const Ontodia = require('ontodia').