react-svg-morph icon indicating copy to clipboard operation
react-svg-morph copied to clipboard

Uncaught TypeError: instance.render is not a function renderToJson.js:24

Open jdobrowner opened this issue 7 years ago • 4 comments

Uncaught TypeError: instance.render is not a function renderToJson.js:24

I followed the docs but get this error. I even made the simplest case but still am getting it. Any ideas?

{ this.state.waveState ? : }

width, height, and this.state.waveState are all defined

jdobrowner avatar Aug 29 '17 19:08 jdobrowner

+1

daveranan avatar Sep 25 '17 21:09 daveranan

@jdobrowner @daveranan The issue has something to do with the react icons package from what I can tell. Anytime I use custom svg's, or components from another package I don't run into this error.

mqschwanda avatar Oct 04 '17 15:10 mqschwanda

In my case, this error happened because I was using icons defined as functional react components. Converting the icons to classes fixed the error.

EDIT: react-svg-morph-2 works with icons defined as functional react components

jcmnunes avatar Nov 01 '17 18:11 jcmnunes

No such thing @jcmnunes

joebentaylor1995 avatar Sep 08 '20 22:09 joebentaylor1995