Skip to content

Commit

Permalink
Updates tutorial documentation
Browse files Browse the repository at this point in the history
There's an example using the old `props`. This PR aims to fix that using
the `useContent` approach instead.
  • Loading branch information
caioabe authored and jho406 committed Jan 20, 2025
1 parent 0c2fed9 commit c997e62
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,14 @@ props_template to skip over the block.

```js
import React from 'react'
import { useContent } from '@thoughtbot/superglue'

export default function GreetShow({
body,
footer,
loadGreetPath
}) {
export default function GreetShow() {
const {
body,
footer,
loadGreetPath
} = useContent()
const {greet} = body

return (
Expand Down

0 comments on commit c997e62

Please sign in to comment.