How to add binding events to elements generated by React.createElement ()

I haven"t touched react, before, and now I need to modify the code

.
React.createElement(
        "th",
        { key: key, style: { "width": col.width ? col.width : "auto" } },
        colContent,
        React.createElement(
            "i",null,""
        )
)

now I want to add a click event to the generated I tag. What should I do

Mar.12,2021

createElement () is called as follows:

  https://codepen.io/CodingMonk.

Menu