Ramp Front end assessment
Anonymous User
4200

Please write a simple React component.
The component takes one prop named "input".
There are three types of input:

  1. 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.
  2. If the prop is an array, return an list of divs, each containing one element of the array.
  3. 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.

Comments (1)