diff --git a/developer-docs-site/docs/tutorials/build-e2e-dapp/4-fetch-data-from-chain.md b/developer-docs-site/docs/tutorials/build-e2e-dapp/4-fetch-data-from-chain.md index 5ccf8c4298480..7feb0c96d1704 100644 --- a/developer-docs-site/docs/tutorials/build-e2e-dapp/4-fetch-data-from-chain.md +++ b/developer-docs-site/docs/tutorials/build-e2e-dapp/4-fetch-data-from-chain.md @@ -57,12 +57,7 @@ function App ( The `account` object is `null` if there is no account connected; when an account is connected, the `account` object holds the account information, including the account address. 3. Next, we want to fetch the account’s TodoList resource. - Begin by importing `useEffect` by adding: - -```jsx -import { useEffect } from "react"; -``` - + Begin by importing `useEffect` by using `jsx import useEffect from "react"; ` Let’s add a `useEffect` hook to our file that would call a function to fetch the resource whenever our account address changes: ```jsx @@ -75,17 +70,17 @@ function App() { } ``` -4. Before creating our `fetchList` function, let’s also create a local state to store whether the account has a list. - Import `useState` by using ```import { useState, useEffect } from "react"; ``` - Next create a state variable `accountHasList` and its setter `setAccountHasList` +4. Before creating our `fetchList` function, let’s also create a local state to store whether the account has a list: -```jsx +```js function App ( ... const [accountHasList, setAccountHasList] = useState(false); ... ) ``` +also import `useEffect` using +```import { useState, useEffect } from "react"; ``` 5. Our `useEffect` hook is calling a `fetchList` function; let’s create it: diff --git a/developer-docs-site/scripts/additional_dict.txt b/developer-docs-site/scripts/additional_dict.txt index 9f159242d7541..b9032ea48ec7e 100644 --- a/developer-docs-site/scripts/additional_dict.txt +++ b/developer-docs-site/scripts/additional_dict.txt @@ -339,8 +339,6 @@ accessors accountHasList acount addr -ae -af ait allowfullscreen allowlist @@ -353,7 +351,6 @@ aptoslabs arity arweave asia -async atomicity auth authenticator @@ -402,7 +399,6 @@ dapp dapp's dapps data's -dbab de deallocate debuggability @@ -437,7 +433,6 @@ enums extensibility failover faq -fdaefc fetchList filesystem findable @@ -451,7 +446,6 @@ fungibility gcloud gcp gcs -getAccountResource getAddressByName getPrimaryNameByAddress groth @@ -511,7 +505,6 @@ mempool mempools merkle mintAptosName -moduleAddress monorepo multinode multisig @@ -605,7 +598,6 @@ subtyping superset svg synchronizer -TodoListResource terraform testnet th @@ -657,7 +649,6 @@ waypoint webapp whitepaper withdrawable -xcbddf xFD xlarge yaml