dante2 icon indicating copy to clipboard operation
dante2 copied to clipboard

Element type is invalid error when: import Dante from 'Dante2'

Open shsunmoonlee opened this issue 7 years ago • 4 comments

Thanks for the awesome work. Would appreciate your help!

Uncaught (in promise) Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check the render method of MediumEditor.

import React, { Fragment, Component } from 'react';
import Dante from 'Dante2'
class MediumEditor extends Component {
  render() {
    return (
      <Dante />
    )
  }
}
export default MediumEditor

shsunmoonlee avatar Oct 06 '18 11:10 shsunmoonlee

Which version are you using?

michelson avatar Oct 06 '18 12:10 michelson

I've tried up to date version

shsunmoonlee avatar Oct 06 '18 16:10 shsunmoonlee

Which version are you using? Do you install it as Dante2@next?

El sáb., 6 de oct. de 2018 13:07, Seunghun Sunmoon Lee < [email protected]> escribió:

I've tried up to date version

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/michelson/dante2/issues/131#issuecomment-427585659, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAuyBAPRlAD4U05bzBn2C-rY-qVT0shks5uiNVVgaJpZM4XLTYT .

michelson avatar Oct 06 '18 16:10 michelson

I've tried both Dante2@next, "Dante2": "0.4.0", 0.5.0-rc5

shsunmoonlee avatar Oct 07 '18 10:10 shsunmoonlee