Subscribe to a stream of Request Animation Frame updates with an Effection resource.
import { each, main, suspend } from "effection";
import { raf } from "@effectionx/raf";
await main(function* () {
for (const frame of yield* each(raf)) {
// add your handler code here
console.log(frame);
yield* each.next();
}
});