Skip to content

docs: Improves Remix quickstart documentation #136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions npm-packages/docs/docs/quickstart/remix.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ Learn how to query data from Convex in a Remix app.
</Step>

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

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

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

```
npx convex import --table tasks sampleData.jsonl
Expand Down
4 changes: 2 additions & 2 deletions npm-packages/private-demos/quickstarts/remix/app/root.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import {
data,
Links,
Meta,
Outlet,
Scripts,
ScrollRestoration,
json,
useLoaderData,
} from "@remix-run/react";
import { ConvexProvider, ConvexReactClient } from "convex/react";
import { useState } from "react";

export async function loader() {
const CONVEX_URL = process.env["CONVEX_URL"]!;
return json({ ENV: { CONVEX_URL } });
return data({ ENV: { CONVEX_URL } });
}

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