The problem is that there is no return value:
const def = (props) => { <div></div> };
This is not returning anything, you have wrapped the body of the arrow function with curly braces but there is no return value.
Use this:
const def = (props) => { return (<div></div>); };
Or
const def = (props) => <div></div>;
This will return a valid React component. Inside your jsx you can't have if ... else ... but only ternary operators.
I hope this helps.