Error: Can't add property onScroll, object is not extensible
This is the stack trace I am getting right now, after swapping LazyloadView for ListView:
Error: Can't add property onScroll, object is not extensible
stack:
React.createClass._merge index.ios.bundle?…:86404
React.createClass.render index.ios.bundle?…:86539
ReactCompositeComponentMixin._renderValidatedComponentWithoutOwnerOrContext index.ios.bundle?…:8961
ReactCompositeComponentMixin._renderValidatedComponent index.ios.bundle?…:8983
wrapper [as _renderValidatedComponent] index.ios.bundle?…:5850
ReactCompositeComponentMixin.mountComponent index.ios.bundle?…:8480
wrapper [as mountComponent] index.ios.bundle?…:5850
Object.ReactReconciler.mountComponent index.ios.bundle?…:6688
ReactMultiChild.Mixin.mountChildren index.ios.bundle?…:23365
ReactNativeBaseComponent.Mixin.initializeChildren index.ios.bundle?…:19782
ReactNativeBaseComponent.Mixin.mountComponent index.ios.bundle?…:19906
Object.ReactReconciler.mountComponent index.ios.bundle?…:6688
ReactCompositeComponentMixin.mountComponent index.ios.bundle?…:8486
wrapper [as mountComponent] index.ios.bundle?…:5850
Object.ReactReconciler.mountComponent index.ios.bundle?…:6688
ReactCompositeComponentMixin.mountComponent index.ios.bundle?…:8486
URL: undefined
line: undefined
message: Can't add property onScroll, object is not extensible
Here is how I am calling the view:
'use strict';
var React = require('react-native');
var {Image, View} = React;
var LazyloadView = require('react-native-scrollview-lazyload');
var ExampleComponent = React.createClass({
// Stuff for getting the slide data, etc.
// Not necessarily relevant for the lazyload issue.
_renderSlide: function (slide) {
return (
<View>
<Image
resizeMode={'contain'}
lazyloadSrc={{uri: slide.uri}}/>
</View>
);
},
render: function () {
return (
<View>
<LazyloadView
dataSource={this.state.dataSource}
renderRow={this._renderSlide}/>
</View>
);
}
});
module.exports = ExampleComponent;
Issue is here? - https://github.com/IskenHuang/react-native-scrollview-lazyload/blob/master/index.js#L153-L158
How did you go about solving that issue within the render function on line 153. I'm having a problem with that same _merge function. I received an error saying "Attempted to assign to readonly property.
+1
@jeromecovington @schmarjames Could you provide your react-native version?
I noticed this problem on react-native v0.14.2