avataaars icon indicating copy to clipboard operation
avataaars copied to clipboard

Uncaught TypeError: Cannot read property 'addStateChangeListener' of undefined

Open sujanbasnet opened this issue 4 years ago • 2 comments

Screen Shot 2020-09-02 at 9 28 53 AM

I get the above issue when including the avatar in a package. I'm building the package using create-react-library.

React version: 16.8.6

sujanbasnet avatar Sep 02 '20 03:09 sujanbasnet

Remove the {} around Avatar when you import it so just do => import Avatar from 'avataaars'

johnvehr avatar Dec 07 '20 20:12 johnvehr

If anyone wants to use an upgraded version where this is solved, here is the fork and package.

lek890 avatar Dec 23 '20 22:12 lek890