title: React Component Function with Each child in a list should have a unique "key" prop. Check the render method
body: <p>Okay. So here is the deal. Without this component - everything was fine in my project. While with it, it points out this warning.</p>
  <p>Warning: Each child in a list should have a unique &quot;key&quot; prop. Check the render method</p>
  <p>I am currently using it in only one place in my project. And if I will comment it out, the problem will vanish. So for sure there is something wrong with it.</p>
  <p>Here is the component code. Just a simple timer.</p>
  <p><a href="https://pastebin.com/dj2jy7wi" rel="nofollow noreferrer">https://pastebin.com/dj2jy7wi</a></p>
  <p>The problem with it and why I am here. It's because I cannot understand why it makes this error.</p>
  <p>For convinience I will post the place where I am using it. So you will see, that I am not iterating through it.</p>
  <p><code>&lt;WaitTimer startDate={visitNext.ehrAppointment?.start_datetime_ltz.getTime()}/&gt;</code>
  This is it!</p>
  <pre><code>  return (
  &lt;Card className={className}&gt;
    &lt;div&gt;
      &lt;div className=&quot;font-bold text-xs&quot;&gt;Next Patient:&lt;/div&gt;
      {visitNext ?
        &lt;div&gt;
          &lt;CardHeading&gt;{visitNext.ehrPatient?.name}&lt;/CardHeading&gt;
          &lt;WaitTimer startDate={visitNext.ehrAppointment?.start_datetime_ltz.getTime()}/&gt;
          &lt;ul className=&quot;pl-5&quot;&gt;
            &lt;Field label=&quot;Reason for Visit&quot; value={visitNext.ehrAppointment.reason} /&gt;
            &lt;Field label=&quot;Gender&quot; value={visitNext.ehrPatient?.gender} /&gt;
            &lt;Field label=&quot;Language&quot; value={visitNext.ehrPatient?.language} /&gt;
            &lt;Field label=&quot;Translator&quot; value={visitNeedTranslator} /&gt;
            &lt;Field label=&quot;Preexisting Conditions&quot; value={(visitNext.ehrPatient &amp;&amp; visitNext.ehrPatient.conditions) ? visitNext.ehrPatient.conditions.join(',') : ''}/&gt;
            &lt;Field label=&quot;Current Medications&quot; value={(visitNext.ehrPatient &amp;&amp; visitNext.ehrPatient.medications) ? visitNext.ehrPatient.medications.join(',') : ''}/&gt;
            {visitNext.ehrAppointment.references.length &gt; 0 ? (
              &lt;li&gt;
                &lt;label className=&quot;text-bold&quot;&gt;Attached Files:&lt;/label&gt;
                {visitNext.ehrAppointment.references.map((e, i) =&gt; (
                  &lt;a
                    key={i}
                    className=&quot;flex rounded-lg my-3 border border-link py-3 px-4 text-link text-xs items-center cursor-pointer&quot;
                    href={&quot;http://localhost:3000/&quot; + e}
                    target=&quot;_blank&quot;
                    rel=&quot;noreferrer&quot;
                  &gt;
                    &lt;span className=&quot;flex-grow underline&quot;&gt;{e.replace(/^.*[\\\/]/, '')}&lt;/span&gt;
                    &lt;Icon name=&quot;file_download&quot; outline /&gt;
                  &lt;/a&gt;
                ))}
              &lt;/li&gt;
            ) : (
              &lt;Field label=&quot;Attached Files&quot; value=&quot;None&quot; /&gt;
            )}
          &lt;/ul&gt;
          &lt;div className=&quot;mt-5 text-center&quot;&gt;
            &lt;Button as=&quot;button&quot; onClick={startVisit}&gt;
              Start Visit
            &lt;/Button&gt;
          &lt;/div&gt;
        &lt;/div&gt; :
        &lt;LoadingSpinner/&gt;
      }
    &lt;/div&gt;
  &lt;/Card&gt;
  </code></pre>
  <p>);</p>
  <p>This upper piece of code is flowing directly intro index.tsx
  Here. As NextPatientCard</p>
  <pre><code> return (
  &lt;Layout&gt;
    &lt;div className=&quot;grid gap-4 lg:grid-cols-3 md:grid-cols-2 sm:grid-cols-1&quot; &gt;
      &lt;div&gt;
        &lt;NextPatientCard className=&quot;my-2&quot; visitNext={visitNext}/&gt;
        &lt;InviteCard /&gt;
      &lt;/div&gt;
      &lt;div&gt;
        &lt;PatientQueueCard className=&quot;my-2&quot; onDemandQueue={onDemandQueue} visitQueue={visitQueue} isNewVisit={isNewVisit} setIsNewVisit={setIsNewVisit}/&gt;
        &lt;ContentManagementCard className=&quot;my-2&quot; contentAssigned={contentAssigned} contentAvailable={contentAvailable}/&gt;
        &lt;SurveyResultsCard className=&quot;my-2&quot;/&gt;
      &lt;/div&gt;
      &lt;div className=&quot;order-first lg:order-last&quot;&gt;
        &lt;AudioVideoCard /&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/Layout&gt;
  </code></pre>
  <p>);</p>
  <p>My question is the following. Why I am reciving this error and how to fix it in this case ?</p>
  <p>I've tried nearly everything. Putting key property on the outside div's.
  Passing data to my function with an WaitTimerProps interface and ect..</p>
  <p>Nothing is working. And the best and most curious part is the following..
  As you can see on the outer render where I am using my
  <code>&lt;WaitTimer startDate={visitNext.ehrAppointment?.start_datetime_ltz.getTime()}/&gt;</code></p>
  <p>We have another custom component. Just on the upper lane</p>
  <pre><code>&lt;CardHeading&gt;{visitNext.ehrPatient?.name}&lt;/CardHeading&gt;
  </code></pre>
  <p>If it was working before with it and without any errors (thus it is passing data to it)
  And they are even in the same place in the project. So it is made in a way, to not have this warning, right ?</p>
  <p>Here is it's code:</p>
  <pre><code>export interface CardHeadingProps {
    children: React.ReactNode;
  }
  export const CardHeading = ({ children }: CardHeadingProps) =&gt; {
    return (
      &lt;h1 className=&quot;text-2xl text-primary whitespace-pre-wrap&quot;&gt;{children}&lt;/h1&gt;
    );
  };
  </code></pre>
  <p>Really simple huh ?</p>
  <p>I've converted my WaitTimer to this similar signature and props interface.
  And it was even working as before.
  But still... with this warning :(</p>
  <p>I don't know what to do and try next.
  Maybe the problem lies here in the render function of my WaitTimer</p>
  <pre><code>  return (
        &lt;div className=&quot;font-bold text-light text-xs&quot;&gt;
          &lt;div&gt;
            {textLabel} {timerComponents}
          &lt;/div&gt;
        &lt;/div&gt;
    );
  </code></pre>
  <p>I've also tried to put key on these div's. But it was pointless as always.</p>
  <p>What is really wrong with it and with React itself ?
  And why I am having this warning ONLY with my component!</p>
  <p>Could anyone point me to the right direction, please ?</p>