Skip to content

document thrown errors #879

@giladgray

Description

@giladgray

This library seems to throw errors when receiving unexpected inputs, which has the unfortunate side effect of absolutely crashing my app (happened in production even, because I was not aware of some error states). Would love some notes in the docs about when the components will throw errors so I can prepare for them. Or, would love fewer thrown errors: a silent fail on out-of-bounds scrollToRow would be just fine by me, don't need to crash for that.

Here's what I've found so far:

  • row/columnCount={0} will crash in render with "Invalid index 0"
  • scrollToCell/Row/Index will crash if given out-of-bounds index (< 0, > count). (fwiw, JS itself doesn't crash when you access an array out of bounds, so I find this behavior quite unexpected.)

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