Skip to content

Commit

Permalink
Use React.element in clone-element
Browse files Browse the repository at this point in the history
  • Loading branch information
davesnx committed Nov 20, 2024
1 parent 4f5df8a commit 7d776d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/clone-element.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: cloneElement
---

Signature: `let cloneElement: (reactElement, ~props: Js.t({..})=?, 'anyChildrenType) => reactElement`
Signature: `let cloneElement: (React.element, ~props: Js.t({..})=?, 'anyChildrenType) => React.element`

Same as ReactJS' [cloneElement](https://reactjs.org/docs/react-api.html#cloneelement). However, adding extra props to a ReasonReact component doesn't make sense; you'd use a [**render prop**](https://reactjs.org/docs/render-props.html). Therefore, `ReasonReact.cloneElement` is only used in edge-cases.

Expand Down

0 comments on commit 7d776d7

Please sign in to comment.