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: Error in React Tutorial Step 3 #150

Closed
2 tasks done
000-KunalPal opened this issue Oct 2, 2023 · 4 comments
Closed
2 tasks done

📚 Documentation: Error in React Tutorial Step 3 #150

000-KunalPal opened this issue Oct 2, 2023 · 4 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@000-KunalPal
Copy link

💭 Description

In the React tutorial under step 3, there is a mistake in the code snippet provided. Specifically, the export statement in line 9 exports database but in our step 7: Create ideas page, the import statement imports databases.

Current code:

import { Client, Databases, Account } from "appwrite";

const client = new Client();
client
  .setEndpoint("https://cloud.appwrite.io/v1")
  .setProject("<YOUR_PROJECT_ID>"); // Replace with your project ID

export const account = new Account(client);
export const database = new Databases(client);

Suggested correction:

import { Client, Databases, Account } from "appwrite";

const client = new Client();
client
  .setEndpoint("https://cloud.appwrite.io/v1")
  .setProject("<YOUR_PROJECT_ID>"); // Replace with your project ID

export const account = new Account(client);
export const databases = new Databases(client);

This adjustment ensures that the code functions as expected.

Steps to Reproduce:

  1. Go to the SvelteKit tutorial step 3.
  2. Follow the provided code snippet.

Expected Behavior:
The code provided should be accurate and functional.

Additional Information:
Documentation URL: https://appwrite.io/docs/tutorials/react/step-3

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@000-KunalPal 000-KunalPal added the documentation Improvements or additions to documentation label Oct 2, 2023
@Gilbishkosma
Copy link

The same issue is in the step-3 of React, Vue and Svelte tutorial. Can i work on it?

@gewenyu99
Copy link
Contributor

@Gilbishkosma Yes, you can work on it. I've assigned it to you.

@Gilbishkosma
Copy link

@gewenyu99 thanks, i have raised a PR for the same.
#154

@Gilbishkosma
Copy link

@gewenyu99 we can close this issue, as the PR has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants