Skip to content
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

Documentation updates for migrating from CRA to Vite #70

Open
wants to merge 3 commits 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
2 changes: 2 additions & 0 deletions docs/How-To-Guides/how-to-create-play.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ Parameter details

- Continue developing your play. Happy coding.

> **Note:** When creating different component files for your play _(A separate file to create a component that includes JSX elements, like a custom button component for example)_, please use either a `.jsx`, `.ts` or `.tsx` file extension. This is due to our platform now using Vite for building.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would .ts be fine? As far as I understand, when we use React components with Vite, the file extension should either be .jsx or .tsx right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can use .js & .ts but we should use .jsx & .tsx


## 👀 Submitting a Play for Review

After you done with coding for your `Play`, you can submit it for review. Submitting a `Play` for review is a two step process.
Expand Down
6 changes: 3 additions & 3 deletions docs/local-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ npm install --legacy-peer-deps
## Create a `.env` file at the root of your project folder with the following content,

```bash
REACT_APP_NHOST_BACKEND_URL=https://rgkjmwftqtbpayoyolwh.nhost.run/
REACT_APP_NHOST_VERSION=v1
REACT_APP_NHOST_ENDPOINT=graphql
VITE_NHOST_BACKEND_URL=https://rgkjmwftqtbpayoyolwh.nhost.run/
VITE_NHOST_VERSION=v1
VITE_NHOST_ENDPOINT=graphql
```

## Start the Development Mode
Expand Down