Build A Temperature Converter Component

Challenge:

Build a “Temperature Converter” component that has two input fields that converts temperature from Celsius to Fahrenheit and viceversa.

  1. Celsius field should default to 0 and Fahrenheit field should default to 32.
  2. As and when the user types a number in Celsius field, it should update the Fahrenheit field.
  3. And similarly when the user types a number in Fahrenheit field, it should update Celsius field.
  4. If the user types a non number, it should reset it to default values.

The component should be self-contained and should not use any external libraries, CSS, etc.

Prerequisite:

  • You have a Lightning enabled Developer Edition Org.