DD
Size: a a a
DD
DS
React.Node = ReactChild | ReactFragment | ReactPortal | boolean | null | undefined
, а компонент react не может возвращать undefinedDS
DS
EM
DS
DS
EM
DB
DD
EM
DS
DS
DD
const Test: FC<{
children: React.ReactNode;
}> = ({ children }) => {
const { systemErrors, runtimeErrors } = useErrorService();
const hasNoCriticalErrors = isEmpty(systemErrors) && isEmpty(runtimeErrors);
if (hasNoCriticalErrors) {
return children;
}
return <ErrorPage systemErrors={systemErrors} runtimeErrors={runtimeErrors} />;
};
DD
DS
DS
DS
DS
DS