The <FileRoutes> component collects routes from the file-system in the /routes folder to be inserted into a parent <Router> component.
Since FileRoutes returns a route configuration, it must be placed directly inside a <Router>, usually the one in your app.tsx file.
app.tsx
tsx
import { Suspense
Tracks all resources inside a component and renders a fallback until they are all resolved
```typescript
const AsyncComponent = lazy(() => import('./component'));
<Suspense fallback={<LoadingIndicator />}>
<AsyncComponent />
</Suspense>
```
(alias) function Suspense(props: {
fallback?: JSX.Element;
children: JSX.Element;
}): JSX.Element
import Suspense
} from"solid-js";
import { Router
(alias) function Router(props: RouterProps): JSX.Element
import Router
(alias) function Router(props: RouterProps): JSX.Element
import Router
root
A component that wraps the content of every route.
(property) root?: Component<RouteSectionProps<unknown>> | undefined
={props
(parameter) props: RouteSectionProps<unknown>
=> <Suspense
Tracks all resources inside a component and renders a fallback until they are all resolved
```typescript
const AsyncComponent = lazy(() => import('./component'));
<Suspense fallback={<LoadingIndicator />}>
<AsyncComponent />
</Suspense>
```
(alias) function Suspense(props: {
fallback?: JSX.Element;
children: JSX.Element;
}): JSX.Element
import Suspense
Tracks all resources inside a component and renders a fallback until they are all resolved
```typescript
const AsyncComponent = lazy(() => import('./component'));
<Suspense fallback={<LoadingIndicator />}>
<AsyncComponent />
</Suspense>
```
(alias) function Suspense(props: {
fallback?: JSX.Element;
children: JSX.Element;
}): JSX.Element
import Suspense
(alias) function Router(props: RouterProps): JSX.Element
import Router
>
);
}
app.tsx
tsx
import { Suspense
Tracks all resources inside a component and renders a fallback until they are all resolved
```typescript
const AsyncComponent = lazy(() => import('./component'));
<Suspense fallback={<LoadingIndicator />}>
<AsyncComponent />
</Suspense>
```
(alias) function Suspense(props: {
fallback?: JSX.Element;
children: JSX.Element;
}): JSX.Element
import Suspense
} from"solid-js";
import { Router
(alias) function Router(props: RouterProps): JSX.Element
import Router
(alias) function Router(props: RouterProps): JSX.Element
import Router
root
A component that wraps the content of every route.
(property) root?: Component<RouteSectionProps<unknown>> | undefined
={props
(parameter) props: RouteSectionProps<unknown>
=> <Suspense
Tracks all resources inside a component and renders a fallback until they are all resolved
```typescript
const AsyncComponent = lazy(() => import('./component'));
<Suspense fallback={<LoadingIndicator />}>
<AsyncComponent />
</Suspense>
```
(alias) function Suspense(props: {
fallback?: JSX.Element;
children: JSX.Element;
}): JSX.Element
import Suspense
Tracks all resources inside a component and renders a fallback until they are all resolved
```typescript
const AsyncComponent = lazy(() => import('./component'));
<Suspense fallback={<LoadingIndicator />}>
<AsyncComponent />
</Suspense>
```
(alias) function Suspense(props: {
fallback?: JSX.Element;
children: JSX.Element;
}): JSX.Element
import Suspense