Skip to content

[ScrollView] Consistent .measure API for ScrollView #1060

@JohnyDays

Description

@JohnyDays

I would like to allow for any renderable view to be passed in as a component type used in a module, right now the only problem with this approach is that .measure is not present in ScrollView.

I would expect .measure on the ScrollView component to redirect itself to its container, since that is just an implementation detail of the ScrollView.

My current solution is to allow for a function: reachContainer(element: view) prop that gets called and returns the actual measurable container, for this specific case, which is obviously worse than just having a consistent api.

Is .measure just an implementation detail that I shouldn't be using, or is it the defacto api for getting layout details after rendering, if so i'd argue it should be consistent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions