P
P
PavelScron2018-10-16 13:01:17
JavaScript
PavelScron, 2018-10-16 13:01:17

Generator functions - does it make sense to study?

Such a question: does it make sense to teach Juna generators? As far as I know, instead of them, async await is already widely used. Or are generators used in popular frameworks (reactjs, vuejs - haven't gotten to them yet)?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Alexey Yarkov, 2018-10-16
@PavelScron

Read here, maybe it will become clearer:
https://medium.com/front-end-hacking/modern-javasc...

A
Astrohas, 2018-10-16
@Astrohas

Generators and async await are slightly different things. So worth it.

V
Vladimir, 2018-10-16
@Casufi

And the generator can also be used where an array map is usually used, but unlike the latter, it will not create another array in memory, saving resources.

A
Afanasy Zakharov, 2018-10-16
@afanasiyz

I don't know what you mean by "does it make sense to study" - an hour is enough for you to get acquainted, I think.
And then decide for yourself.
If I were you, I would study (at least superficially) everything you find - just to have an idea, it will suddenly come in handy - and you have already read something like that, and then you will find it again and solve the problem.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question