5 ms·
Why? Whenever you return „void“ you return „this“. That does not make anything more complicated. It is a pattern that suits itself well in front end code. When
by G3rn0ti 5y ago
Why? Whenever you return „void“ you return „this“. That does not make anything more complicated. It is a pattern that suits itself well in front end code. When it comes to async. code, however, it’s a different story since you return promises in this case that are also chainable.
- laurent123456 5y ago> When it comes to async. code, however, it’s a different story since you return promises in this case that are also chainable. So that's one issue. That's what I mean by the interface being more complicated - void is void, but if you return something there might be some edge cases, some of which are difficult to predict. Personally I think it's not worth the trouble.