Skip to content

Option to pass in an initial dimensions object #19

@nautilytics

Description

@nautilytics

For many of my d3 use cases, I'm using the width and height values to calculate scales and/or shapes before rendering. Could you add a way to accept an initial dimension object so that width and height will always be defined? For example,

const [ref, { width, height }] = useDimensions({ width: 100, height: 100 });

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