Skip to content

Error: Can't add property onScroll, object is not extensible #1

@jeromecovington

Description

@jeromecovington

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions