Please write a simple React component.
The component takes one prop named "input".
There are three types of input:
- If the prop is undefined or falsy, return a live-updating date and time (update every second) in a div. Please pretty-format the date and time.
- If the prop is an array, return an list of divs, each containing one element of the array.
- If the prop is anything else, return the value of the prop in a div.
A functional component using React Hooks is preferred, though not required. displaying instances of the component, one per input type.
If anyone can help me with this assessment.