As an exercise, I am currently transforming some class components into FunctionComponent, using the new hook style. But I faced a strange problem: class components can render undefined (and so, will not display anything), stateless function components can render undefined, but if we need the new FunctionComponent to render nothing, it can only return null, and not undefined (same for RefForwardingComponent).
I think this is a bug, and it will be annoying as my policy (and I know it is the same in many companies) is to avoid usage of null, and prefer undefined.
The correction is trivial, so if you confirm this is an issue, I can make a PR.
As an exercise, I am currently transforming some class components into FunctionComponent, using the new hook style. But I faced a strange problem: class components can render undefined (and so, will not display anything), stateless function components can render undefined, but if we need the new FunctionComponent to render nothing, it can only return null, and not undefined (same for RefForwardingComponent).
I think this is a bug, and it will be annoying as my policy (and I know it is the same in many companies) is to avoid usage of null, and prefer undefined.
The correction is trivial, so if you confirm this is an issue, I can make a PR.
@types/reactpackage and had problems.Definitions by:inindex.d.ts) so they can respond.