gianu / react-fittext

React Plugin to fit text on the screen
http://softwarepsychonaut.com/react-fittext
MIT License
218 stars 51 forks source link

Browser throws errors #9

Closed johnryan closed 9 years ago

johnryan commented 9 years ago

Seeing errors when i load the page in my browser

Warning: getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.
warning.js:36 Warning: Something is calling a React component directly. Use a factory or JSX instead. See: http://fb.me/react-legacyfactory
warning.js:48 Warning: ReactFitText(...): No `render` method found on the returned component instance: you may have forgotten to define `render` in your component or you may have accidentally tried to render an element whose type is a function that isn't a React component.
warning.js:36 Warning: Don't set the props property of the component. Mutate the existing props object instead.
ReactCompositeComponent.js:153 Uncaught TypeError: Can't add property context, object is not extensible
gianu commented 9 years ago

Thanks for reporting this @johnryan . I'll take a look at it today.

robgietema commented 9 years ago

I got the same error, I'm using ES6.

sevenfoxes commented 9 years ago

I get this issue as well.

jonlong commented 9 years ago

Sweet — looks like this got fixed in #8!

@gianu I think this error is coming from the version on NPM, which looks like it hasn't been updated yet.

gianu commented 9 years ago

@jonlong I just published a new version with the change on #8 . Let me know if this fix the issue.

jonlong commented 9 years ago

@gianu Works! Thanks for the quick fix!