squiggle icon indicating copy to clipboard operation
squiggle copied to clipboard

Use `useTransition` in `useSimulator` hook

Open berekuk opened this issue 1 year ago • 0 comments

When Squiggle renders, there are two potentially blocking stages:

  1. Running Squiggle code in squiggle-lang
  2. Rendering the viewer (incl. canvas, etc.)

Webworkers will potentially solve (1), but for (2), we need to call useTransition. Then React will render the viewer in the background.

berekuk avatar May 06 '24 17:05 berekuk