Brilliant solution, very simple and effective. Although I think ? 1 : 0 is not necessary :p
? 1 : 0
Yes. It's not really necessary because true is turn into 1, and false to 0. I have a second version using that and a reducer in the demo.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.