File tree Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import {
1212 altVisible ,
1313 button
1414} from './styles'
15- import { RefForwardingElement } from './viewportParentDocument'
15+ // import { RefForwardingElement } from './viewportParentDocument'
1616
1717function App ( ) {
1818 const parentRef = React . useRef ( null )
@@ -63,21 +63,21 @@ function App() {
6363 )
6464}
6565
66- function App2 ( ) {
67- const forwardRef = React . useCallback ( node => {
68- console . log ( 'node ->' , node )
69- } )
70- const [ showElement , toggleElement ] = React . useState ( true )
66+ // function App2() {
67+ // const forwardRef = React.useCallback(node => {
68+ // console.log('node ->', node)
69+ // })
70+ // const [showElement, toggleElement] = React.useState(true)
7171
72- return (
73- < >
74- < button onClick = { _ => toggleElement ( v => ! v ) } >
75- { showElement ? 'Hide Element' : 'Show Element' }
76- </ button >
77- { showElement ? < RefForwardingElement ref = { forwardRef } threshold = { 75 } /> : null }
78- </ >
79- )
80- }
72+ // return (
73+ // <>
74+ // <button onClick={_ => toggleElement(v => !v)}>
75+ // {showElement ? 'Hide Element' : 'Show Element'}
76+ // </button>
77+ // {showElement ? <RefForwardingElement ref={forwardRef} threshold={75} /> : null }
78+ // </>
79+ // )
80+ // }
8181
8282async function run ( ) {
8383 if ( ! window . IntersectionObserver ) {
You can’t perform that action at this time.
0 commit comments