Skip to content

Can't import types for hook return values - might want to add docs? #2632

@DenisPekerman

Description

@DenisPekerman

I'm using the useGeolocation hook and I wanted to use the return type GeoLocationSensorState.
However I couldn't seem to import it although I see it in the source code.

import{ useGeolocation, GeoLocationSensorState } from 'react-use';

ChatGPT helped me realize I should import types directly from

import type { GeoLocationSensorState } from 'react-use/lib/useGeolocation';

Maybe it's worth adding it to the docs?

Thanks!

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