datchley / react-scale-text

A React library to keep an element's text scaled to fit it's container
MIT License
54 stars 18 forks source link

"this.updater.enqueueCallback is not a function" on page load #11

Closed Southclaws closed 6 years ago

Southclaws commented 6 years ago

As soon as I added a ScaleText around a p, my page threw a huge load of errors:

Uncaught TypeError: this.updater.enqueueCallback is not a function
    at ScaleText../node_modules/react-scale-text/node_modules/react/lib/ReactBaseClasses.js.ReactComponent.setState (ReactBaseClasses.js:64)
    at ScaleText.resize (index.js:116)
    at ScaleText.componentDidMount (index.js:69)
    at commitLifeCycles (react-dom.development.js:8778)
    at commitAllLifeCycles (react-dom.development.js:9938)
    at HTMLUnknownElement.callCallback (react-dom.development.js:540)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:579)
    at invokeGuardedCallback (react-dom.development.js:436)
    at commitRoot (react-dom.development.js:10042)
    at performWorkOnRoot (react-dom.development.js:10966)
    at performWork (react-dom.development.js:10916)
    at requestWork (react-dom.development.js:10832)
    at scheduleWorkImpl (react-dom.development.js:10715)
    at scheduleWork (react-dom.development.js:10677)
    at Object.enqueueSetState (react-dom.development.js:6184)
    at Objects../node_modules/react/cjs/react.development.js.Component.setState (react.development.js:226)
    at Objects.<anonymous> (Objects.tsx:38)
    at step (Navigation.tsx:66)
    at Object.next (Navigation.tsx:66)
    at fulfilled (Navigation.tsx:66)
    at <anonymous>

Not sure what to do with that one, shame as this is just the component I need to solve a slight UI issue with long usernames...

datchley commented 6 years ago

Getting ready to merge in #12 which is a dependency upgrade to support React 16, which should correct this issue.

datchley commented 6 years ago

We've got 1.1.4 out now which should correct these issues. I'm going to close this; but feel free to reopen if you're still seeing problems.