Function query

  • Search for 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 null | ReactElement<ComponentProps<Component>, Component>

    The element if there is one matching element

    null if there are no matching elements

    Throws

    If there is more than one matching element

Generated using TypeDoc