Prompt elements have an async prepare method and a sync render method.
I wonder why we cannot join them into an async render method? I think it could simplify usage a lot: Internal state does not have to be defined in a separate interface and making functions used in render async doesn't force to move them to prepare.
render methods could still return a raw value (not a promise) for cases where performance matters.
Prompt elements have an async
prepare
method and a syncrender
method. I wonder why we cannot join them into an async render method? I think it could simplify usage a lot: Internal state does not have to be defined in a separate interface and making functions used in render async doesn't force to move them toprepare
.render
methods could still return a raw value (not a promise) for cases where performance matters.What do you think?