Skip to content

Commit 2e00114

Browse files
committed
docs: polish
1 parent 93685d4 commit 2e00114

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/pages/event-based/+Page.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ You may be tempted to create generic telefunctions but we recommend against it.
2424
```ts
2525
// database/todo.telefunc.ts
2626

27-
// ❌ Generic telefunction: one telefunction re-used for multiple use case
27+
// ❌ Generic telefunction: one telefunction re-used for multiple use cases
2828
export async function updateTask(id: number, modifications: Partial<TodoItem>) {
2929
// ...
3030
}
@@ -34,6 +34,7 @@ export async function updateTask(id: number, modifications: Partial<TodoItem>) {
3434
// components/TodoList.telefunc.ts
3535

3636
// ✅ Event-based telefunctions: one telefunction per use case
37+
3738
export async function onTodoTextUpdate(id: number, text: string) {
3839
// ...
3940
}
@@ -43,7 +44,7 @@ export async function onTodoCompleted(id: number) {
4344
```
4445

4546
In the example below, we explain why event-based telefunctions lead to increased:
46-
- Development speed (and we explain how to keep things DRY)
47+
- Development speed (while we explain how to keep telefunctions DRY)
4748
- Security
4849
- Performance
4950

@@ -129,7 +130,7 @@ This naming convention ensures telefunctions are tightly coupled to UI component
129130
130131
#### Too restrictive convention?
131132
132-
To keep things [DRY](https://softwareengineering.stackexchange.com/questions/400183/what-should-i-consider-when-the-dry-and-kiss-principles-are-incompatible) you may be tempted to define a single telefunction that is re-used by many UI components. For example:
133+
To keep telefunctions [DRY](https://softwareengineering.stackexchange.com/questions/400183/what-should-i-consider-when-the-dry-and-kiss-principles-are-incompatible) you may be tempted to define a single telefunction that is re-used by many UI components. For example:
133134
134135
```ts
135136
// database/actions/tasks.telefunc.ts
@@ -214,8 +215,7 @@ That's why we recommend event-based telefunctions, along with the naming convent
214215
215216
## Naming convention
216217
217-
As explained in <Link href="#example">the example above</Link>, for a clear structure and more effective use of Telefunc, we recommend the following convention.
218-
218+
As explained in <Link href="#example">the example above</Link>, for a clear structure and efficient Telefunc usage, we recommend the following convention.
219219
220220
Name telefunctions `onSomeEvent()`:
221221
@@ -257,5 +257,5 @@ Telefunc shows a warning if you don't follow the naming convention — you can o
257257
258258
## See also
259259
260-
- <Link href="/multiple-clients" />
261260
- <Link href="/disableNamingConvention" />
261+
- <Link href="/multiple-clients" />

0 commit comments

Comments
 (0)