Skip to content

hesbon-osoro/ramp-job-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAMP (test)

Instructions

Please write a simple React component that does the following:

  • The component takes one prop named "input".
  • There are three types of input:
  1. 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.
  2. If the prop is an array, return a 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.

How to setup

# 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