Issue with console.log not working once
why here console.log ONCE not working even once ?
i used this but is there better solution ?
i used this but is there better solution ?
Effect.tap(() => Effect.sync(() => console.log("ONCE")).pipe(Effect.once))let firstTime = true;
Effect.promise(() => app()).pipe(
Effect.tap(() => Console.log("ONCE").pipe(Effect.when(() => firstTime))),
Effect.tap(() => Effect.sync(() => (firstTime = false))),
Effect.repeat(Schedule.spaced(3000)),
Effect.runPromise
);