Skip to content

Commit

Permalink
Use lower-case /api/ links
Browse files Browse the repository at this point in the history
  • Loading branch information
AmberGraceSoftware committed Jan 1, 2025
1 parent a17ac9e commit 6734814
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions docs/Chapter1/Directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ from the VirtualInstance.

## Basic Directives

The [:SetProperties()](/API/VirtualInstance#SetProperties) and
[:AddChildren()](/API/VirtualInstance#AddChildren) directives define a
The [:SetProperties()](/api/VirtualInstance#SetProperties) and
[:AddChildren()](/api/VirtualInstance#AddChildren) directives define a
VirtualInstance's properties and children respectively. The first two arguments
of VirtualInstance constructors (such as [Dex.New](/api/Dex#New)) automatically
add a `:SetProperties()` and `:AddChildren()` directive when defined.
Expand Down
18 changes: 9 additions & 9 deletions docs/Chapter1/MappingChildComponents.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,10 @@ Let's briefly go over a feature of VirtualInstances: ***Directives***.

VirtualInstances have special methods on them called ***Directives***, which are
instructions of how Dex should put together the instance heirarchy when
reconciled by a [Root](/API/Root) object. If you've followed along with the
reconciled by a [Root](/api/Root) object. If you've followed along with the
guide so far, you have actually been using two directives under the hood
already: [:SetProperties()](/API/VirtualInstance#SetProperties) and
[:AddChildren()](/API/VirtualInstance#AddChildren)!
already: [:SetProperties()](/api/VirtualInstance#SetProperties) and
[:AddChildren()](/api/VirtualInstance#AddChildren)!

```lua
-- Creating a VirtualInstance with "Properties" and "Children" tables defined:
Expand All @@ -178,8 +178,8 @@ virtualInstance2:AddChildren({
:::info
Under the hood, when passing the "properties" and "children" arguments to the
VirtualInstance constructors, Dex is actually adding the directives
[:SetProperties()](/API/VirtualInstance#SetProperties) and
[:AddChildren()](/API/VirtualInstance#AddChildren) to the new VirtualInstance.
[:SetProperties()](/api/VirtualInstance#SetProperties) and
[:AddChildren()](/api/VirtualInstance#AddChildren) to the new VirtualInstance.

Please note that _VirtualInstance directives **should only be called within the
same scope that the VirtualInstance is created in!**_
Expand All @@ -198,7 +198,7 @@ cases, however, you probably only want to create new child instances when an
item is added to a list, and destroy old ones when an item is removed from the
list.

Dex provides the [:MapChildren()](/API/VirtualInstance#MapChildren) method for
Dex provides the [:MapChildren()](/api/VirtualInstance#MapChildren) method for
this very common use case!
```lua
local function TodoList(props: {
Expand Down Expand Up @@ -299,10 +299,10 @@ todoItems:Set({
</center>
<br/>

In addition to [:MapChildren()](/API/VirtualInstance#MapChildren), Dex also
In addition to [:MapChildren()](/api/VirtualInstance#MapChildren), Dex also
provides the directives
[:MapChildrenByKey()](/API/VirtualInstance#MapChildrenByKey) and
[:MapChildrenByValue()](/API/VirtualInstance#MapChildrenByValue), which behave
[:MapChildrenByKey()](/api/VirtualInstance#MapChildrenByKey) and
[:MapChildrenByValue()](/api/VirtualInstance#MapChildrenByValue), which behave
in slightly different ways:

- ***MapChildren*** creates a new instance for every key/value pair. If a key
Expand Down

0 comments on commit 6734814

Please sign in to comment.