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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃摎 Documentation: need to import relevant class to create user without an error #20

Open
2 tasks done
RuwanPradeep0 opened this issue May 17, 2024 · 0 comments
Open
2 tasks done
Labels
documentation Improvements or additions to documentation

Comments

@RuwanPradeep0
Copy link

馃挱 Description

import { Client, Account } from 'react-native-appwrite';
// Init your React Native SDK
const client = new Client();

client
.setEndpoint('http://localhost/v1') // Your Appwrite Endpoint
.setProject('455x34dfkj')
.setPlatform('com.example.myappwriteapp') // YOUR application ID
;

const account = new Account(client);

// Register User
account.create(ID.unique(), 'me@example.com', 'password', 'Jane Doe')
.then(function (response) {
console.log(response);
}, function (error) {
console.log(error);
});

in here instant of using
import { Client, Account } from 'react-native-appwrite';

need to use
import { Client, Account ,ID } from 'react-native-appwrite';

if not ID.unique() will not be work properly

馃憖 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?

@RuwanPradeep0 RuwanPradeep0 added the documentation Improvements or additions to documentation label May 17, 2024
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

1 participant