Using React and React Hooks to Switch Electric Lights and Read Real Sensors 🔋💡

Mate Marschalko
10 min readApr 28, 2021

What if I told you it’s possible to program real-world electric components with React? Yes, that’s right! You can get electric sensors to update a React component’s state and switch circuits on and off based on state and props.

All this with React Hooks!

Why?

--

--

Mate Marschalko

Senior Creative Developer, Generative AI, Electronics with over 15 years experience | JavaScript, HTML, CSS