79088209

Date: 2024-10-15 02:17:53
Score: 1
Natty:
Report link

Use ReactNode instead of any for typing children in your component. as it covers everything React can render.

Follow this code as an example:

const Section = ({childeres} : {children:ReactNode}): ReactElement => {
     return  <div> {children}</div>;
};
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Mohammed Faruk