rehooks/ideas

useAmbientLightSensor

samouss opened this issue · 2 comments

https://developer.mozilla.org/en-US/docs/Web/API/AmbientLightSensor

const App = () => {
  const value = useAmbientLightSensor();

  if (value > 50) {
    return "Light";
  }

  return "Dark";
};

@samouss I've started this here: https://github.com/camflan/light-sensor

can you give it a shot?

Yep looks good!