DEV Community

Discussion on: 10 ReactJS Coding Challenge (💥Coding Interview Prep💥)

Collapse
 
belle1306 profile image
Isabelle Francis

For create counter app challenge, i created two functions (decrease and increase) to be passed instead, later simply calling ....is that inline with best practise?

Collapse
 
frontendengineer profile image
Let's Code

it is and is common in any ReactJS applications

Collapse
 
hawk-pdx profile image
Garrett Hawkins

you got it :)
sure, you can definitely achieve the same outcome in many different ways... to include, a single inline statement. however, over simplifying can cause confusion for your future-self and others. 2 separate functions make more sense IMO.