Problem statement

In this challenge, you were asked to build a small form, that includes inputs for user’s basic data.

Here are the requirements that you received:

  • The form should have three inputs (“First name”, “Last name” and “City”)
  • First and last name inputs should be required (using the “required” attribute), city input should be optional.
  • When the user focuses on any input in the form, the form border should change colour to indicate that the user is actively filling the form.

You went straight into the code and created a reusable BaseInput component that was a simple wrapper component for an input element. You wrapper the component in a <label> tag to include the label.

#interview #vuejs #interview-questions #vue

Vue.js Interview Challenge— Tricky Input Refactor
6.20 GEEK