ashubham/markee

Unable to use Markee in REACT

ReactUser2 opened this issue · 3 comments

In REACT :
import { Markee } from 'markee';
console.log(Markee, 'here is the Markee');

undefined "here is the Markee" <<<<< Markee is undefined after import


Using the code sample from codepen within React fails :

TypeError: Cannot read property 'default' of undefined
at ProxyComponent.componentDidMount

@ReactUser2 Seems your module loader is not able to identify this correctly.

Have you tried

import Markee from 'markee';

console.log(Markee); // Should have Markee Class Constructor.

Hi Ashish,
Thanks for your quick response. Yes. The first thing I tried before was to check the value of the Markee object returned from the import. I have tried both
import { Markee } from 'markee'
and
import Markee from 'markee'
and they both return 'undefined'

@ReactUser2 Sorry for being super late, and maybe this is not relevant to you anymore.

Did you also try import * as Markee from 'markee ?