import { useState } from 'react'; import { createRoot } from 'react-dom/client'; import { StickyLane, usePublishedHeight } from '../../src/client/StickyLane.js'; function Measured({ id, property, height }: { id: string; property: string; height: number }) { const ref = usePublishedHeight(property); return
{id}
; } function SummaryReader({ id, height, show }: { id: string; height: number; show: boolean }) { return
{show && }
; } function App() { const [height, setHeight] = useState(52); const [show, setShow] = useState(true); return <>
用时
; } createRoot(document.getElementById('app')!).render();