I've been looking at some react location videos and came accross this example :
[{
path: "/",
import: () =>
import("./components/homeModule").then((module) => module.default),
},
{
path: "product",
children: [
{
path: ":id",
import: () =>
import("./components/pdpModule").then((module) => module.default),
},
],
}]
Instead of importing the component above the import it in the route item itself. What exactly does this do? Does this improve performance?