I recently developed a basic BMI calculator using React.js. I am now attempting to implement a feature where if the calculated BMI result falls outside the range of a healthy BMI, the result text will be displayed in red color (I am utilizing styled-components for this purpose). However, I am facing challenges determining the appropriate location to integrate this functionality, whether within the Form or Result component, and what methodologies to employ (I reviewed the classNames library but found it difficult to grasp based on the provided examples). Any guidance from fellow developers would be greatly appreciated.
Form element
// Code for Form component...
Result element
// Code for Result component...
Thank you in advance for any assistance you can provide.