Please write a simple React component that does the following:
- The component takes one prop named "input".
- There are three types of input:
- If the prop is a falsy value, return a live-updating date and time (update every second) in a div. Please pretty-format the date and time. Use the native JavaScript Date object.
- If the prop is an array, return a 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.
# Clone this repo
git clone https://github.com/hesbon-osoro/ramp-job-test.git
# Go to directory
cd ramp-job-test && yarn
# Start the app
yarn start