79086158

Date: 2024-10-14 12:32:59
Score: 0.5
Natty:
Report link

In react 18, They removed children as a default prop on the FC type. Please use below code to fix the issue.

Existing Code:
export const ContextClass: React.FC = ({children}) => {}

Improved Code:
export const ContextClass = ({children}: {children: React.ReactNode}) => {}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Sazzadhusen Iproliya