Skip to content

Commit

Permalink
docs: naming scheme closes #903
Browse files Browse the repository at this point in the history
  • Loading branch information
jayair committed Aug 23, 2024
1 parent 42dd793 commit 75ba383
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions www/src/content/docs/docs/components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,14 @@ const function = new sst.aws.Function("MyFunction", {
There are two guidelines to follow when naming your components:

1. The names of SST's built-in components and components extended with [`Linkable.wrap`](/docs/component/linkable/#static-wrap) need to be global across your entire app.
2. Optionally, use PascalCase for the component name. For example, `MyFunction` instead of `myFunction` or `my_function`.

These make it possible to [link resources](/docs/linking/) together in your SST app.
This allows [Resource Linking](linking) to look these resources up at runtime.

2. Optionally, use PascalCase for the component name.

For example, you can might name your bucket, `MyBucket` and use Resource Linking to look it up with `Resource.MyBucket`.

However this is purely cosmetic. You can use kebab case. So `my-bucket`, and look it up using `Resource['my-bucket']`.

---

Expand Down

0 comments on commit 75ba383

Please sign in to comment.