Function getProps

  • Get props of the single matching element for the query in the rendered react tree

    Type Parameters

    • Component extends ComponentType<any> | keyof IntrinsicElements

    Parameters

    • element: ReactElement<any, string | JSXElementConstructor<any>>

      Target react element

    • queryParam: QueryType<Component>
    • Optional params: ParamsType<Component>

      Params for search inside elements of exotic components

    Returns ComponentProps<Component>

    Props of the matching element

    Throws

    If there is more than one matching element or if there are no matching elements

Generated using TypeDoc