Skip to content

Commit a3c0ff7

Browse files
committed
Add onlyIfAnnotated to focus example
1 parent a3e49d1 commit a3c0ff7

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

.changeset/lovely-houses-rule.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"codehike": patch
33
---
44

5-
Fix `jsxDEV` warning
5+
Better use of `jsxDEV` when children aren't static, fix #433 in #435

.changeset/violet-insects-melt.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"codehike": patch
33
---
44

5-
Compatibility with ts `moduleResolution: node`, fix #437
5+
Compatibility with ts `moduleResolution: node`, fix #437 in #441

apps/web/content/docs/code/focus.mdx

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import React, { useLayoutEffect, useRef } from "react"
3333

3434
export const focus: AnnotationHandler = {
3535
name: "focus",
36+
onlyIfAnnotated: true,
3637
PreWithRef: (props) => {
3738
const ref = getPreRef(props)
3839
useScrollToFocus(ref)

0 commit comments

Comments
 (0)