We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Although convenient, this was an unwise decision https://github.com/richardscarrott/react-snap-carousel/blob/main/src/use-snap-carousel.tsx#L176 because React can (and will) remove the the className / styles.
May just have to leave snap point rendering down to the <Carousel /> implementor, e.g.
<Carousel />
const Carousel = () => { const { pages } = useSnapCarousel(); const snapPointIndexes = new Set(pages.map((page) => page[0])); return ( <ul> {items.map((_, i) => <li style={{ scrollSnapAlign: snapPointIndexes.has(i) ? 'start' : '' }}>{i}</li>)} </ul> ); }
Could expose snapPointIndexes from useSnapCarousel to make it a little easier.
snapPointIndexes
useSnapCarousel
The text was updated successfully, but these errors were encountered:
Merge pull request #7 from richardscarrott/#6-snap-point-rendering
6256741
#6 Move snap point rendering to call site
Fixed in 0.2.0
Sorry, something went wrong.
No branches or pull requests
Although convenient, this was an unwise decision https://github.com/richardscarrott/react-snap-carousel/blob/main/src/use-snap-carousel.tsx#L176 because React can (and will) remove the the className / styles.
May just have to leave snap point rendering down to the
<Carousel />
implementor, e.g.Could expose
snapPointIndexes
fromuseSnapCarousel
to make it a little easier.The text was updated successfully, but these errors were encountered: