Thanks so much for reading. Symbols are nothing but primitive values that are used for identifiers for functions.
Generators let us control how to loop through things. It's especially useful if we want to return an indeterminate collection of things in a controlled way.
I was thinking of using a Generator to create that continuous loading effect that I've seen on websites like Facebook or pagination too. Would these be good usecases?
True on that point and awesome to hear that it's a good solution for the first point. Still trying to get my head around good use cases, because it's just not obvious to me when I first, second and 10th time heard about them.
Thanks for your support and feedback!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Roger,
Thanks so much for reading. Symbols are nothing but primitive values that are used for identifiers for functions.
Generators let us control how to loop through things. It's especially useful if we want to return an indeterminate collection of things in a controlled way.
I was thinking of using a Generator to create that continuous loading effect that I've seen on websites like Facebook or pagination too. Would these be good usecases?
You can use async generators to get data for infinite scrolling.
Probably don't need generators for pagination as much since you're overwriting existing data.
True on that point and awesome to hear that it's a good solution for the first point. Still trying to get my head around good use cases, because it's just not obvious to me when I first, second and 10th time heard about them.
Thanks for your support and feedback!