Skip to content

Commit

Permalink
fix: unused import (#1073)
Browse files Browse the repository at this point in the history
Noticed this unneeded import in code blocks

Co-authored-by: Ryan Carniato <[email protected]>
  • Loading branch information
stickyburn and ryansolid authored Oct 17, 2023
1 parent 8b2d26b commit 4ed94f6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/core-concepts/data-loading.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function routeData() {
Now your component can use the `useRouteData` function to access the data that is returned by `routeData`.

```tsx twoslash filename="/routes/students.tsx"
import { For, Accessor, createResource } from "solid-js";
import { For, createResource } from "solid-js";
import { useRouteData } from "solid-start";

type Student = { name: string; house: string; }
Expand Down Expand Up @@ -72,7 +72,7 @@ Okay, enough with the rules. We thought `createResource` was too low level for m
Here's the same example as above, but using `createRouteData`:

```tsx twoslash filename="/routes/students.tsx"
import { For, Accessor, createResource } from "solid-js";
import { For, createResource } from "solid-js";
import { useRouteData, createRouteData } from "solid-start";

type Student = { name: string; house: string; }
Expand Down Expand Up @@ -106,7 +106,7 @@ It could be database access, or internal APIs, etc. It could sit within your fun
```tsx twoslash {8} filename="/routes/students.tsx"
const hogwarts = { students: { list() { return [] as Student[] } } }
// ---cut---
import { For, Accessor, createResource } from "solid-js";
import { For, createResource } from "solid-js";
import { useRouteData } from "solid-start";
import { createServerData$ } from "solid-start/server";

Expand Down Expand Up @@ -138,7 +138,7 @@ For example, you might have a route that needs to load data from a database and
```tsx twoslash filename="/routes/students.tsx"
const hogwarts = { students: { list() { return [] } } }
// ---cut---
import { For, Accessor, createResource } from "solid-js";
import { For, createResource } from "solid-js";
import { useRouteData, createRouteData } from "solid-start";
import { createServerData$ } from "solid-start/server";

Expand Down

0 comments on commit 4ed94f6

Please sign in to comment.