* sacrifices a goat *
* lights incense *
"Dan Abramov"
"Dan Abramov"
"Dan Abramov"
Hey Dan 👋 How's London?
Anyway, I was just wondering if you could tell us React devs how preloading is supposed to work in this brave new Suspense world.
Thanks!
But now I'm hearing far, far more complex, and at times contradictory advice.
Boring.
Let's talk about *real* waterfalls: network waterfalls.
Especially considering the data args their queries use will often be known up front, before the component is import()ed
const ToDoListLazt = lazy(() => import("./todoList"))
and component has something like
ToDoList = () => {
const args = useTodoFilters();
// get data w/ args
}
then the data deps are known up front. Surely we should preload them AS the lazy import() is in flight?
difference between "fetch then render" & "fetch as you render"
Should have said
difference between "render then fetch" [ie fetch in useEffect] & "fetch as you render"