Skip to content

Second initialSize paremeter is not set to optional #102

@ebrearley

Description

@ebrearley

The second parameter initialSize of useContainerQuery must be defined in a typescript project, even though it is optional.
image

To fix this, all that needs to change ia this line:

export const useContainerQuery = (query: Query, initialSize: Size) => {

https://github.com/react-container-query/react-container-query/blob/master/src/index.tsx#L15

to:

export const useContainerQuery = (query: Query, initialSize?: Size) => {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions