Skip to content

Commit 4866f00

Browse files
committed
Remove forwardRef reference as deprecated
1 parent 91460e8 commit 4866f00

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/content/5/en/part5c.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ In our example, the mock function is a perfect choice since it can be easily use
384384
Let's write a few tests for the <i>Togglable</i> component. Let's add the <i>togglableContent</i> CSS classname to the div that returns the child components.
385385

386386
```js
387-
const Togglable = forwardRef((props, ref) => {
387+
const Togglable = props => {
388388
// ...
389389

390390
return (
@@ -400,7 +400,7 @@ const Togglable = forwardRef((props, ref) => {
400400
</div>
401401
</div>
402402
)
403-
})
403+
}
404404
```
405405

406406
The tests are shown below:

src/content/5/fi/osa5c.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ Esimerkissämme mock-funktio sopi tarkoitukseen erinomaisesti, sillä sen avulla
387387
Tehdään komponentille <i>Togglable</i> muutama testi. Lisätään komponentin lapset renderöivään div-elementtiin CSS-luokka <i>togglableContent</i>:
388388

389389
```js
390-
const Togglable = forwardRef((props, ref) => {
390+
const Togglable = props => {
391391
// ...
392392

393393
return (
@@ -403,7 +403,7 @@ const Togglable = forwardRef((props, ref) => {
403403
</div>
404404
</div>
405405
)
406-
})
406+
}
407407
```
408408

409409
Testit ovat seuraavassa:

0 commit comments

Comments
 (0)