What kind of parameter is this? { children }: { children: JSX.Element }
This is the function declaration
function RequireAuth({ children }: { children: JSX.Element }) {
let auth = useAuth();
let location = useLocation();
if (!auth.user) {
return <Navigate to="/login" state={{ from: location }} replace />;
}
return children;
}
I know that the function takes JSX component, but I still don’t know which syntax the parameter uses.