Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In tutorial, add missing useContent() to show.js #134

Merged
merged 2 commits into from
Jan 21, 2025

Conversation

sbleon
Copy link
Contributor

@sbleon sbleon commented Jan 20, 2025

I'm very new to superglue, so I could very well be doing something silly, but the tutorial code wasn't working for me as written. I was getting an error:

Uncaught TypeError: Cannot destructure property 'greet' of 'body' as it is undefined. at GreetShow (show.js:36:10)

Adding the useContent() make things work as expected.

In my React env, it's not possible to return multiple elements without a wrapping element or fragment, so the example code was not compiling.
@sbleon sbleon requested a review from jho406 as a code owner January 20, 2025 23:51
@jho406
Copy link
Collaborator

jho406 commented Jan 21, 2025

Welcome! and thank you so much for making the documentation better! No its not silly at all, i must of missed a few areas when I was updating the docs.

@jho406 jho406 merged commit 0ed782e into thoughtbot:main Jan 21, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants