What to require
ziziermao opened this issue · 3 comments
ziziermao commented
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?
ShinyChang commented
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 :)
ziziermao commented
thanks, this works!
ShinyChang commented
next version will fix this issue
and require will be
var TextTruncate = require('react-text-truncate');