Difference in doing React.FC and importing FC from React and using it?
Unanswered
πΉπΎ_π·πππππππππππ π posted this in #help-forum
I was wondering if Nextjs offers inbuilt typescript support for React types as when I try using React.FC it doesnt import anything but when i use just FC it imports from react and it's size is around 7kb which might make some impact in the bundle size isn't it? Or are both the same?
4 Replies
You donΓ’β¬β’t need to use React.FC at all
Btw
const Component = (props: { name: string }) => {
return <div>{props.name}</div>;
};Is totally sufficient