Skip to content

Commit

Permalink
update router
Browse files Browse the repository at this point in the history
  • Loading branch information
ryansolid committed Feb 9, 2024
1 parent 17fda8f commit f787f2b
Show file tree
Hide file tree
Showing 23 changed files with 60 additions and 71 deletions.
5 changes: 5 additions & 0 deletions .changeset/heavy-zoos-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@solidjs/start": patch
---

update router
2 changes: 1 addition & 1 deletion docs/routes/advanced/session.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const getStudents = cache(async (house: string) => {

// page component
export default function Students() {
const students = createAsync(getStudents);
const students = createAsync(() => getStudents());
}
```

Expand Down
4 changes: 2 additions & 2 deletions docs/routes/core-concepts/data-loading.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const route = {
};

export default function Page() {
const students = createAsync(getStudents);
const students = createAsync(() => getStudents());

return <ul>{students() && students()!.map(student => <li>{student.name}</li>)}</ul>;
}
Expand Down Expand Up @@ -91,7 +91,7 @@ export const route = {
};

export default function Page() {
const students = createAsync(getStudents);
const students = createAsync(() => getStudents());

return <ul>{students() && students()!.map(student => <li>{student.name}</li>)}</ul>;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"@solidjs/meta": "^0.29.2",
"@solidjs/router": "^0.11.5",
"@solidjs/router": "^0.12.0",
"@solidjs/start": "^0.5.4",
"solid-js": "^1.8.14",
"vinxi": "^0.2.1"
Expand Down
2 changes: 1 addition & 1 deletion examples/experiments/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"@solidjs/meta": "^0.29.2",
"@solidjs/router": "^0.11.5",
"@solidjs/router": "^0.12.0",
"@solidjs/start": "^0.5.4",
"solid-js": "^1.8.14",
"vinxi": "^0.2.1"
Expand Down
2 changes: 1 addition & 1 deletion examples/hackernews/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "vinxi start"
},
"dependencies": {
"@solidjs/router": "^0.11.5",
"@solidjs/router": "^0.12.0",
"@solidjs/start": "^0.5.4",
"solid-js": "^1.8.14",
"vinxi": "^0.2.1"
Expand Down
2 changes: 1 addition & 1 deletion examples/notes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "vinxi start"
},
"dependencies": {
"@solidjs/router": "^0.11.5",
"@solidjs/router": "^0.12.0",
"@solidjs/start": "^0.5.2",
"@types/marked": "^4.3.1",
"date-fns": "^2.30.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/notes/src/components/NoteList.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createAsyncStore } from "@solidjs/router";
import { For, Show } from "solid-js";
import { getNotes } from "~/lib/api";
import { createAsyncStore } from "~/lib/util";
import SidebarNote from "./SidebarNote";

export default function NoteList(props: { searchText: string }) {
Expand Down
16 changes: 0 additions & 16 deletions examples/notes/src/lib/util.ts

This file was deleted.

2 changes: 1 addition & 1 deletion examples/todomvc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "vinxi start"
},
"dependencies": {
"@solidjs/router": "^0.11.5",
"@solidjs/router": "^0.12.0",
"@solidjs/start": "^0.5.4",
"solid-js": "^1.8.14",
"unstorage": "1.10.1",
Expand Down
4 changes: 2 additions & 2 deletions examples/todomvc/src/routes/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
RouteDefinition,
createAsync,
createAsyncStore,
useSubmission,
useSubmissions,
type RouteSectionProps
Expand Down Expand Up @@ -34,7 +34,7 @@ export const route = {
} satisfies RouteDefinition;

export default function TodoApp(props: RouteSectionProps) {
const todos = createAsync(getTodos, { initialValue: [], deferStream: true });
const todos = createAsyncStore(() => getTodos(), { initialValue: [], deferStream: true });
const location = props.location;

const addingTodo = useSubmissions(addTodo);
Expand Down
2 changes: 1 addition & 1 deletion examples/with-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@types/node": "^20.10.1"
},
"dependencies": {
"@solidjs/router": "^0.11.5",
"@solidjs/router": "^0.12.0",
"@solidjs/start": "^0.5.4",
"solid-js": "^1.8.14",
"unstorage": "1.10.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-auth/src/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const route = {
} satisfies RouteDefinition;

export default function Home() {
const user = createAsync(getUser, { deferStream: true });
const user = createAsync(() => getUser(), { deferStream: true });
return (
<main class="w-full p-4 space-y-2">
<h2 class="font-bold text-3xl">Hello {user()?.username}</h2>
Expand Down
2 changes: 1 addition & 1 deletion examples/with-mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"@mdx-js/mdx": "^2.3.0",
"@solidjs/router": "^0.11.5",
"@solidjs/router": "^0.12.0",
"@solidjs/start": "^0.5.4",
"@vinxi/plugin-mdx": "^3.6.7",
"solid-js": "^1.8.14",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-prisma/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"@prisma/client": "^5.7.0",
"@solidjs/router": "^0.11.5",
"@solidjs/router": "^0.12.0",
"@solidjs/start": "^0.5.4",
"prisma": "^5.7.0",
"solid-js": "^1.8.14",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-prisma/src/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const route = {
} satisfies RouteDefinition;

export default function Home() {
const user = createAsync(getUser, { deferStream: true });
const user = createAsync(() => getUser(), { deferStream: true });
return (
<main class="w-full p-4 space-y-2">
<h2 class="font-bold text-3xl">Hello {user()?.username}</h2>
Expand Down
2 changes: 1 addition & 1 deletion examples/with-solid-styled/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"@solidjs/meta": "^0.29.2",
"@solidjs/router": "^0.11.5",
"@solidjs/router": "^0.12.0",
"@solidjs/start": "^0.5.4",
"solid-js": "^1.8.14",
"solid-styled": "^0.8.2",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-tailwindcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "vinxi start"
},
"dependencies": {
"@solidjs/router": "^0.11.5",
"@solidjs/router": "^0.12.0",
"@solidjs/start": "^0.5.4",
"autoprefixer": "^10.4.14",
"postcss": "^8.4.26",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-trpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@trpc/client": "^10.44.1",
"@trpc/server": "^10.44.1",
"@solidjs/meta": "^0.29.2",
"@solidjs/router": "^0.11.5",
"@solidjs/router": "^0.12.0",
"@solidjs/start": "^0.5.4",
"solid-js": "^1.8.14",
"valibot": "^0.23.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-unocss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "vinxi start"
},
"dependencies": {
"@solidjs/router": "^0.11.5",
"@solidjs/router": "^0.12.0",
"@solidjs/start": "^0.5.4",
"@unocss/reset": "^0.58.3",
"solid-js": "^1.8.14",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-vitest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"type": "module",
"devDependencies": {
"@solidjs/meta": "^0.29.3",
"@solidjs/router": "^0.11.5",
"@solidjs/router": "^0.12.0",
"@solidjs/start": "^0.5.4",
"@solidjs/testing-library": "^0.8.5",
"@testing-library/jest-dom": "^6.1.5",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@cloudflare/kv-asset-handler": "^0.2.0",
"@decs/typeschema": "^0.12.1",
"@solidjs/meta": "^0.29.0",
"@solidjs/router": "^0.11.5",
"@solidjs/router": "^0.12.0",
"@solidjs/start": "workspace:*",
"@tailwindcss/typography": "^0.5.9",
"@trpc/client": "^9.27.4",
Expand Down
Loading

0 comments on commit f787f2b

Please sign in to comment.