ShinyChang/React-Text-Truncate

What to require

ziziermao opened this issue · 3 comments

Hey,
May I ask what to require when I try to use the TextTruncate?
I tried
require('react-text-truncate');
require('react-text-truncate/TextTruncate');
require('react-text-truncate').TextTruncate;
all not working. Could you please suggest?

I think it will work.

var TextTruncate = require('react-text-truncate').default;

Usually I used like this

import TextTruncate from 'react-text-truncate';

try it!

Please reply me if you have any problem :)

thanks, this works!

next version will fix this issue

and require will be

var TextTruncate = require('react-text-truncate');