Skip to content

Commit 85f4244

Browse files
committed
addKepProp function
1 parent 9ac34b0 commit 85f4244

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/React.res

+3
Original file line numberDiff line numberDiff line change
@@ -432,3 +432,6 @@ external setDisplayName: (component<'props>, string) => unit = "displayName"
432432

433433
@get @return(nullable)
434434
external displayName: component<'props> => option<string> = "displayName"
435+
436+
@inline
437+
let addKeyProp = (o: 't, k): 't => Obj.magic(Js.Obj.assign(Obj.magic(o), {"key": k}))

0 commit comments

Comments
 (0)