title: How to fix error "jsx element class doesnt support attributes because it doesnt have a 'props' property using react and typescript?
body: <p>i have the code like below,</p>
  <pre><code>const Function = () =&gt; {
      const renderLabel = (
          &lt;&gt;
              &lt;Text mr={2}&gt;Event forwarding&lt;/Text&gt; //error here
              &lt;Tooltip
                  overlay=&quot;some tooltip&quot;
              &gt;
                  &lt;span&gt;
                      &lt;Icon /&gt;
                  &lt;/span&gt;
             &lt;/Tooltip&gt;
         &lt;/&gt;
     );
  
  
     return (
         &lt;FormField label={renderLabel}&gt;
             {({ field, form }: FieldProps) =&gt; (
                 &lt;Switch /&gt;
             )}
          &lt;/&gt;
     );
  </code></pre>
  <p>}</p>
  <p>I am not sure how to fix this error &quot; jsx element class doesnt support attributes because it doesnt have a 'props&quot;</p>
  <p>could someone help me with this. thanks.</p>