1. arguments to useTransition() 2. measuring async updates
quicker one this time :)
1. looking at the official docs for useTransition:
start is taking two arguments in the example, but only takes one in the typescript. Is the second argument just undocumented? something like
and I guess is there a preference between using the second arg and the promise assuming they both measure the same thing?
2. This question is a bit larger than just async but it's coming up because I want to be able to measure the impact using async has on the latency of my app. The most straightforward way to do that is to add a profiler mark before solidjs has done any rendering, and then add a profiler mark after solidjs is "done". the thing is, I'm not sure how to define "done" or if there is even an API for it! My naive guess would be when the effect stack has "cleared" ie, we are at 0 render effects or effects, so the only thing that could cause an update would be an external/DOM event, but I don't see any way to track that just based on the public API.
2 Replies
gotcha, so the answer to #1 is "the type signature is right the docs are wrong", cool