turning the customSlider handle change function from an if else if statement to a switch statement
141# ๐ ๏ธ Fixes Issue
Closes #141
๐จโ๐ป Changes proposed
in the CustomSlider.jsx component the handleChange function have some if else statements which slows down the process by a little bit
so i've changed it to a switch statement
the switch statement is faster in most cases when compared to if-else, but significantly faster only when the number of conditions is large. And It would help to make it more readable
๐ Note to reviewers
the switch statement is faster in most cases when compared to if-else, but significantly faster only when the number of conditions is large. And It would help to make it more readable
turning the customSlider handle change function from an if else if statement to a switch statement
141# ๐ ๏ธ Fixes Issue
Closes #141
๐จโ๐ป Changes proposed
in the CustomSlider.jsx component the handleChange function have some if else statements which slows down the process by a little bit
so i've changed it to a switch statement
the switch statement is faster in most cases when compared to if-else, but significantly faster only when the number of conditions is large. And It would help to make it more readable
๐ Note to reviewers
the switch statement is faster in most cases when compared to if-else, but significantly faster only when the number of conditions is large. And It would help to make it more readable