Skip to content

Commit f540897

Browse files
committed
Added hash helper when used
1 parent 3f553bd commit f540897

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

guides/release/in-depth-topics/patterns-for-components.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ The first parameter of the helper is a component to render. So `{{component Blog
217217
The `component` helper is often used when yielding components to blocks. For example the layout for a SuperForm component might be implemented as:
218218

219219
```gjs {data-filename=app/components/super-form.gjs}
220+
import { hash } from '@ember/helper';
220221
import SuperInput from 'my-app/components/super-input';
221222
import SuperTextarea from 'my-app/components/super-textarea';
222223
import SuperSubmit from 'my-app/components/super-submit';
@@ -253,6 +254,7 @@ The `{{component}}` helper is a powerful tool for improving code modularity.
253254
We can even use helpers and modifiers in the same way. Let's extend the SuperForm component:
254255

255256
```gjs {data-filename=app/components/super-form.gjs}
257+
import { hash } from '@ember/helper';
256258
import SuperInput from 'my-app/components/super-input';
257259
import SuperTextarea from 'my-app/components/super-textarea';
258260
import SuperSubmit from 'my-app/components/super-submit';

guides/release/in-depth-topics/rendering-values.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ For Helpers, there is a specific syntax that only helpers may reside in
5353
```
5454
or nested in a sub-expression
5555
```gjs
56+
import { hash } from '@ember/helper';
57+
5658
<template>
5759
{{yield (hash key=(theHelper) key2=(theHelper with args)) }}
5860
</template>

0 commit comments

Comments
 (0)