0

Im getting the above warning in the file. I have the following code in my RowForm's render function:

const RowForm = React.createClass({
    render: function() {
            return (
                <tr key={'#'} className="addIpsetListRow">
                    <td className="col-lg-1"></td>
                    <td className="col-lg-3">
                        <input type="text"
          .................
................)
});

The above code simply creates a row of form and i have no idea what i should put as a key to make that warning go away.

ssss
  • 551
  • 3
  • 5
  • 14

1 Answers1

0

If you have no data you have to use a random number or a timestamp unfortunately. For example

<tr key={+new Date()} className="addIpsetListRow">