Replies: 5 comments 6 replies
-
|
Adding links here to previous discussions: #298 Note that the components seem to use the old class components instead of the function components. |
Beta Was this translation helpful? Give feedback.
-
|
I'm not a web developer myself but I'm happy to help. I'll ask very dumb question about web development, though! Is async/await orthogonal to React? IIUC React does not strictly depend on async/await, it just (presumably) uses Promise, and async/await is a syntactic sugar for promises. Can I get a sense of how heavy Promise is used in React? Is it just for say network operations, or you also need it for basic UI? It looks like |
Beta Was this translation helpful? Give feedback.
-
|
Promises and await is difficult in jscl because of special variable bindings. it is not clear when an asynchronous operation should preserve them. Fortunately this has been done before with asynchronous local storage in node https://nodejs.org/api/async_context.html However this is not available in browsers. if it were, special variables could be stored into a single Weakmap stored in there that maps symbols to their values. |
Beta Was this translation helpful? Give feedback.
-
|
I have made a simple macro to work with promises: It works the following way: |
Beta Was this translation helpful? Give feedback.
-
|
May be it is possible to implicitly restore local bindings in lambdas, passed to JS functions? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
How can we produce
asyncandwaitcode with JSCL?Also, is there a way to produce react and jsx or tsx components?
Beta Was this translation helpful? Give feedback.
All reactions