rsnext/examples/with-turbopack/lib/demos.ts
Jared Palmer 24787089cf
Add turbopack example (#41789)
<!--
Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change that you're making:
-->

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-10-25 10:21:53 -07:00

83 lines
1.8 KiB
TypeScript

type Item = {
name: string;
items: {
name: string;
slug: string;
description?: string;
isDisabled?: boolean;
}[];
};
export const demos: Item[] = [
{
name: 'Layouts',
items: [
{
name: 'Nested Layouts',
slug: 'layouts',
description: 'Create UI that is shared across routes',
},
{
name: 'Grouped Layouts',
slug: 'route-groups',
description: 'Organize routes without affecting URL paths',
},
{
name: 'Streaming with Suspense',
slug: 'streaming',
description:
'Streaming data fetching from the server with React Suspense',
},
{
name: 'Root Layouts',
slug: 'root-layouts',
description: 'Create top-level layouts that apply to all routes',
isDisabled: true,
},
],
},
{
name: 'File Conventions',
items: [
{
name: 'Loading',
slug: 'loading',
description:
'Create meaningful loading UI for specific parts of an app',
},
{
name: 'Error',
slug: 'error-handling',
description: 'Create error UI for specific parts of an app',
},
],
},
{
name: 'Components',
items: [
{
name: 'Hooks',
slug: 'hooks',
description:
'Preview the hooks available for Client and Server Components',
},
{
name: 'Client Context',
slug: 'context',
description:
'Pass context between Client Components that cross Server/Client Component boundary',
},
],
},
{
name: 'Styling',
items: [
{
name: 'CSS and CSS-in-JS',
slug: 'styling',
description: 'Preview the supported styling solutions',
},
],
},
];