silverwolf-x's picture
download
raw
579 Bytes
import React from 'react'
export default class SnapScrollPosition extends React.Component {
constructor(props) {
super(props)
this.state = { positionY: -1 }
}
componentDidMount() {
this.setState({ positionY: window.scrollY })
}
render() {
return (
<main>
{Array.from({ length: 500 }, (x, i) => i + 1).map((i) => {
return (
<div key={`item-${i}`} id={`item-${i}`}>
{i}
</div>
)
})}
<span id="scroll-pos-y">{this.state.positionY}</span>
</main>
)
}
}

Xet Storage Details

Size:
579 Bytes
·
Xet hash:
d734c3da05e6f7787049a4f818bc179c388d4227d3f214b909979fb7ea1acaf8

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.