From b19af544db31f2c0b5d7f78b6ac6a60fd6b84694 Mon Sep 17 00:00:00 2001 From: Joshua <121734574+jhylacey@users.noreply.github.com> Date: Wed, 5 Apr 2023 12:32:41 -0500 Subject: [PATCH] Fix casing for consistency (#5881) There's 5 instances in this document in which the casing of a file name begins with lower case, which makes it inconsisnent both with the page and the entire tutorial. --- .../learn/importing-and-exporting-components.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/content/learn/importing-and-exporting-components.md b/src/content/learn/importing-and-exporting-components.md index 4ecadf54..f8f55605 100644 --- a/src/content/learn/importing-and-exporting-components.md +++ b/src/content/learn/importing-and-exporting-components.md @@ -138,10 +138,10 @@ How you export your component dictates how you must import it. You will get an e | Syntax | Export statement | Import statement | | ----------- | ----------- | ----------- | -| Default | `export default function Button() {}` | `import Button from './button.js';` | -| Named | `export function Button() {}` | `import { Button } from './button.js';` | +| Default | `export default function Button() {}` | `import Button from './Button.js';` | +| Named | `export function Button() {}` | `import { Button } from './Button.js';` | -When you write a _default_ import, you can put any name you want after `import`. For example, you could write `import Banana from './button.js'` instead and it would still provide you with the same default export. In contrast, with named imports, the name has to match on both sides. That's why they are called _named_ imports! +When you write a _default_ import, you can put any name you want after `import`. For example, you could write `import Banana from './Button.js'` instead and it would still provide you with the same default export. In contrast, with named imports, the name has to match on both sides. That's why they are called _named_ imports! **People often use default exports if the file exports only one component, and use named exports if it exports multiple components and values.** Regardless of which coding style you prefer, always give meaningful names to your component functions and the files that contain them. Components without names, like `export default () => {}`, are discouraged because they make debugging harder. @@ -257,8 +257,8 @@ You may use either a default or a named export for `Profile`, but make sure that | Syntax | Export statement | Import statement | | ----------- | ----------- | ----------- | -| Default | `export default function Button() {}` | `import Button from './button.js';` | -| Named | `export function Button() {}` | `import { Button } from './button.js';` | +| Default | `export default function Button() {}` | `import Button from './Button.js';` | +| Named | `export function Button() {}` | `import { Button } from './Button.js';` |