Javascript – Passing function with arguments as a prop and invoking it internally in React
I got a Badge component in my React app. The badge can be painted in different colors. In order to make it more universal i've decided to add a prop called getBadgeColor. The idea is to implement different functions for…