This repo contains a list input view for Tawkify's takehome quiz.
To run:
npm install
npm run start
Some notes:
- I decided to make the component a controlled component, so I added a
values
andonChange
function. - On that same note, it was unclear to me if 'form' in the prompt meant web form (e.g.
<form>
elements) or just form in the more general UI sense. I interpreted it as the latter, so I didn't add any hidden input elements to represent the values, or try to do any of the cool stuff that libraries likeFormik
does. - I ended up using MUI and react-drag-listview libraries to speed up UI development. However, after testing it seems like react-drag-listview doesn't work on mobile devices. But since this is just an exercise I kept the library.
- This project was bootstrapped with
create-react-app
. See CreateReactApp-README.md for building and dev instructions. Remember to runnpm install
before using this repo. - There's a few edge cases in usage like if
values
property is greater thanmax
. I don't validate these case, since I decided in the interest of implementation time it's the responsibility of the developer to use the component correctly.