Skip to content

Version 5 Introduces Breaking Change Preventing Calling load twice #67

@robert-nash

Description

@robert-nash

https://github.com/JiriHoffmann/react-native-clusterer/blame/9025cbb14306574a9d87be790014d699dfb25832/src/Supercluster.ts#L47

I was previously calling .load on an instance of Supercluster repeatedly in response to changes to the underlying data. This now raises the error "The .load() method can only be called once."

I'm not sure if the way I was doing it before was wrong (although it seemed to work) but I think this could potentially be mentioned in the changelog.

I also wonder if the fact that .load should not be called multiple times should be clearer? I can see that the documentation for the load method says "Once loaded, index is immutable." however I feel this is slightly ambiguous.

Thanks for your work!

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