How to Share Code Snippets Online
Share a readable code snippet with a language label, reproducible steps, and a screenshot, without exposing secrets or pretending the code runs in Woff.
Woff field note
Published
Updated
3 min read
A snippet is useful when someone can understand both the code and the question. Woff lets you put the example, reproduction steps, and a screenshot in one temporary room. It displays code as content; it does not execute your snippet.
Start with the smallest useful example
Remove unrelated code and real customer data. Replace passwords, access tokens, cookies, private keys, and internal URLs with harmless placeholders. Inspect screenshots and logs for the same information.
Use the language name after the opening three backticks. This example is short enough to paste into a room message.
function SubmitButton({ pending }: { pending: boolean }) {
return (
<button disabled={pending}>
{pending ? 'Sending…' : 'Send'}
</button>
);
}Add the question and reproduction steps
A reviewer needs to know what you expected and what happened instead. Include a browser or runtime version when it changes how the issue can be reproduced.
Issue: button remains disabled after a failed request
Expected: show the error and allow another attempt.
Actual: label returns to Send but the button stays disabled.
Reproduce:
1. Open the form.
2. Submit while the network is offline.
3. Reconnect and try again.
Question: where should the pending state reset?Create the room and share its invitation
Open a new room, send the explanation and fenced code, then attach a redacted screenshot if it helps. Use Note for a longer setup guide and save it before sharing.
Copy the full room invitation when the reviewer needs every entry. Send a direct shared-note link when the note alone contains the context. A recipient can open either supported invitation without registering.
Use the existing Photos, Files, and markup actions for supporting media. Uploads are limited to 50 MiB per file and 20 files per batch; the room and sender quotas also apply. Wait for the batch to finish before telling the reviewer the attachment is ready.
Review without losing the original question
Ask the reviewer to reply with the line or function name and the proposed change. Notes have one editing owner, so feedback belongs in a separate message or note. For changes to a repository, move the resulting patch into version control and review it there.
Do not rely on a temporary room for a permanent bug history, automated tests, or an audit trail. Keep a local copy of useful explanations and use your issue tracker for the outcome.
Check access and expiry before handing off
Invitation links grant access and can be forwarded. Standard rooms expire after 48 hours without activity. Pro pilot rooms, where available, use a fixed 7- or 30-day expiry that activity does not extend. Tell the recipient to download what they need before that deadline.
For a compact example of this workflow, see share code snippets. Read help if an attachment fails.