Syntactic Sugar : renderAsync
See original GitHub issueIs your feature request related to a problem? Please describe.
async:true
feels a little clunky, when added as an additional parameter for Eta.render()
let result = await Eta.render(
'<%= it.name %>: <%= await it.asyncFunc() %>',
{ name: 'Ada Lovelace', asyncFunc: asyncFunc },
{ async: true }
)
Describe the solution you’d like
Could we have an additional function Eta.renderAsync()
let result = await Eta.renderAsync(
'<%= it.name %>: <%= await it.asyncFunc() %>',
{ name: 'Ada Lovelace', asyncFunc: asyncFunc }
)
I think this would improve legibility.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How is Suspense different from syntax sugar to render async values ...
No. It's not similar because it's too granular. This is 1:1 relationship between a Promise and a spinner. Suspense is many-to-many.
Read more >language agnostic - Syntactic sugar vs. feature - Stack Overflow
It turns out to be a feature instead of syntactic sugar when it implies a different way of thinking. You are right when...
Read more >Templating with ValueTuples. · Issue #107 · StubbleOrg/Stubble ...
Interesting, this should be possible to add but i'm aware that these names are actually syntactic sugar over Item1, ItemX with attributes identifying...
Read more >Examples of Syntactic Sugar in JavaScript - Sophia Li
Destructuring is syntactic sugar for creating new variables by assigning properties from objects or items from arrays. Destructuring works for ...
Read more >What writing my own JSX renderer taught me about React - DEV ...
JSX is syntactic sugar for JavaScript. It is compiled down to pure JavaScript, and therefore can only be used if a compile step...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Both would be appreciated 👍
@shadowtime2000
I’ve put up a pull request to add @calumk! 🎉