3 ms·
I agree, but I feel like there is something still missing. The render lifecycle works best when everything is already in memory. Fetching data based on state u
by jessekv 2y ago
I agree, but I feel like there is something still missing.
The render lifecycle works best when everything is already in memory. Fetching data based on state updates is tricky. Tasks are supposed to fill this gap, but are still a bit clunky:
https://lit.dev/docs/data/task/ https://lit.dev/docs/data/task/
The most reliable approach for me has been to batch api calls and state updates manually in a separate method on the element, and let lit focus only on rendering.