Do Web Developers Use JS Generator Functions?

0
0
Asked By CreativeCactus92 On

I'm really curious about the usage of JavaScript generator functions among web developers, both frontend and backend. How often do you find yourself using them in various contexts, like learning new concepts, personal projects, or work-related tasks?

4 Answers

Answered By NoPatternNeeded On

You usually don't search for patterns like this intentionally. When your code starts feeling messy, that's often when patterns find you, making your life easier without you planning it ahead.

Answered By CuriousCoder77 On

I can recall one instance where I used an async generator function to fetch a page of items from DynamoDB. It allowed me to let the caller decide when to fetch the next page. While it wasn't necessary to use a generator, it just felt like a perfect fit for that situation, and honestly, it made me feel a bit fancy!

Answered By ForgetfulFrontend34 On

I've never used them in my work, honestly. I even forgot about their existence until I stumbled upon this discussion.

Answered By ReduxRanger88 On

I regularly use Redux Sagas, so yes, generator functions come into play quite often for me. They've been really useful in managing side effects seamlessly.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.