Skip to content

Commit 63efd59

Browse files
thomasballingeradebiyial
authored andcommitted
convex-backend PR 136: docs: Improves Remix quickstart documentation (#38719)
- Refine the Remix quickstart guide to enhance clarity, specifically regarding the creation and usage of the sample data file. - Updates the Remix demo to use the `data` function instead of `json` from `@remix-run/react` ---- By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. Co-authored-by: Adebiyi Adedotun <[email protected]> GitOrigin-RevId: dc9b126efc05429e22e9e51ebb9cde2634ab9839
1 parent f81f5d1 commit 63efd59

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

npm-packages/docs/docs/quickstart/remix.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ Learn how to query data from Convex in a Remix app.
5252
</Step>
5353

5454
<Step title="Create sample data for your database">
55-
In a new terminal window, create a `sampleData.jsonl`
56-
file with some sample data.
55+
Create a `sampleData.jsonl` file at the root of you app
56+
and fill it with the sample data given.
5757

5858
<Snippet
5959
source={sampleData}
@@ -64,8 +64,8 @@ Learn how to query data from Convex in a Remix app.
6464

6565
<Step title="Add the sample data to your database">
6666
Now that your project is ready, add a `tasks` table
67-
with the sample data into your Convex database with
68-
the `import` command.
67+
with the sample data you just created in `sampleData.jsonl`
68+
into your Convex database with the `import` command.
6969

7070
```
7171
npx convex import --table tasks sampleData.jsonl

npm-packages/private-demos/quickstarts/remix/app/root.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import {
2+
data,
23
Links,
34
Meta,
45
Outlet,
56
Scripts,
67
ScrollRestoration,
7-
json,
88
useLoaderData,
99
} from "@remix-run/react";
1010
import { ConvexProvider, ConvexReactClient } from "convex/react";
1111
import { useState } from "react";
1212

1313
export async function loader() {
1414
const CONVEX_URL = process.env["CONVEX_URL"]!;
15-
return json({ ENV: { CONVEX_URL } });
15+
return data({ ENV: { CONVEX_URL } });
1616
}
1717

1818
export function Layout({ children }: { children: React.ReactNode }) {

0 commit comments

Comments
 (0)