Skip to content

Commit

Permalink
Add import syntax for FCL link
Browse files Browse the repository at this point in the history
  • Loading branch information
chasefleming committed Nov 26, 2024
1 parent 9a37d1b commit a801a59
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/build/getting-started/fcl-quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,14 @@ In the above code:
- If an error occurs during the query, we log it to the console.
- We use the script from Step 2 to query the count from the `Counter` contract and format it using the `NumberFormatter` contract.

:::info

In this tutorial, we've shown you hardcoding addresses directly for simplicity and brevity. However, it's **recommended** to use the `import "ContractName"` syntax, as demonstrated in [Step 2: Local Development](./flow-cli.md). This approach is supported by the Flow Client Library (FCL) and allows you to use aliases for contract addresses in your `flow.json` file. It makes your code more flexible, maintainable, and easier to adapt across different environments (e.g., `testnet`, `mainnet`).

Learn more about this best practice in the [FCL Documentation](../../tools/clients/fcl-js/api.md#using-flowjson-for-contract-imports).

:::

### Step 2: Run the App

Start your development server:
Expand Down

0 comments on commit a801a59

Please sign in to comment.