diff --git a/src/routes/docs/tutorials/react/step-4/+page.markdoc b/src/routes/docs/tutorials/react/step-4/+page.markdoc index a9ed0fb0c1..af576f745b 100644 --- a/src/routes/docs/tutorials/react/step-4/+page.markdoc +++ b/src/routes/docs/tutorials/react/step-4/+page.markdoc @@ -13,6 +13,7 @@ We'll use context and a custom hook to manage our user's data. Create a new file `src/lib/context/user.jsx` and add the following code to it. ```js +import { ID } from "appwrite"; import { createContext, useContext, useEffect, useState } from "react"; import { account } from "../appwrite"; @@ -36,7 +37,7 @@ export function UserProvider(props) { } async function register(email, password) { - await account.create(email, password); + await account.create(ID.unique(), email, password); await login(email, password); }