Updating from 0.3.2 to 0.4.2 throws Uncaught Type Error when loading ParseComponent
Updated parse-react from 0.3.2 to latest 0.4.2. Running exact same code/components.
Getting following error:
Uncaught TypeError: Super expression must either be null or a function, not undefined
Anyone else got this issue while updating? If I revert back to 0.3.2 it all loads fine without any error.
Seems like this was caused by react not being up-to-date. Now on 0.13.3, but getting a different error:
Uncaught TypeError: Cannot read property '_currentElement' of nullReactCompositeComponentMixin._updateRenderedComponent @ ReactCompositeComponent.js:744
Any idea what's wrong? Again, going back to 0.3.2 I don't get the error, but I'd like to upgrade!
just use ParseComponent = require('parse-react/class'); would throw this error.
@TristanBBQ are you using ES6 and Babel to write/transpile your code? Do you have a small piece of code that can reproduce this bug?
Just encountered this myself. Not sure what's happening, but I'm guessing it's related to the initial render loop of a component. Digging in further...
@andrewimm cool, I'm digging on my side too trying to isolate the issue. Will give more info
This dummy component renders fine on parse-react v0.3.2:
import React from 'react';
import { Parse } from 'parse';
import ParseReact from 'parse-react';
import ParseComponent from 'parse-react/class';
class DummyComponent extends ParseComponent {
constructor(props) {
super(props);
this.state = {}
}
observe(props, state) {
return {
users: new Parse.Query(Parse.User)
}
}
render() {
return (
<div>
{ this.data.users[0] }
</div>
);
}
};
DummyComponent.contextTypes = {
router: React.PropTypes.func.isRequired
};
export default DummyComponent;
Just by updating to latest version (0.4.2), this same component raises this error:
ReactCompositeComponent.js:744 Uncaught TypeError: Cannot read property '_currentElement' of null
Oh and yes, using ES6 and babel transpiler.
I have the same issue: React 0.13.3 Parse-React 0.3.2 (works fine)
On Parse-React 0.4.2 update i get Uncaught TypeError: Super expression must either be null or a function, not undefined
@TristanBBQ & @nerijusgood - same here.
@andrewimm @jonaswide @nerijusgood what's your workaround right now? are you stuck on 0.3.2 or did just give up on using ES6 classes?
I just rolled back Parse-React