Function mergeProps

  • Merges multiple props objects into a single object.

    Properties with names that match /^on[A-Z]/ and function values are considered event handlers and merged into a single function.

    "ref" properties are considered to store refs and are merged into a single callback ref.

    "className" properties are concatenated.

    Type Parameters

    • T extends any[]

      Props to merge.

    Parameters

    • Rest...props: T

      Props to merge.

    Returns UnionToIntersection<NonNullable<T[number]>>