Open infinnie opened 6 years ago
@infinnie What is this magic? 😄
Imagine that for every component change (say, in an SPA) one wanted to get both the component (here define.requirePromise()
) and the initializing data for that component (say, fetchCompany()
) asynchronously. It would be hard for him or her to ensure that the app renders only once for every component change (I know that it is asynchronous, but…).
Including a function that can return the updated component itself along with the initializing data in the return value of an action, and calling the function in view()
when it gets rendered, would solve the problem.