Performance and Stack Overflow Concerns with Recursion in Paginated API Requests
Paginated API requests: I can implement them using recursion but since JS engines don't have TCO it might be off, right? The docs state to manage state with recursion but I'm not so sure about it in terms of performance/stack overflow?
Right now what I'm doing is using
Right now what I'm doing is using
Ref for a page counter which gets incremented on every execution of the effect, returning a { _tag: "Eof" } when there are no new pages, and Effect.retryWhile(x => x._tag === "Eof")