
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
solid-infinite-scroll-fork
Advanced tools
Infinite scrolling / Dynamic list loading library for SolidJS
First, install the library from the npm registry:
yarn add -D solid-infinite-scroll
Second, import it in the tsx component you're working on:
import InfiniteScroll from 'solid-infinite-scroll';
To use the infinite scroll module, you would need a signal/resource for data storage, and implement two functions:
each
should return the currently stored data array, this is similar to the SolidJS <For>
componenthasMore
should return true if more data is availablenext
should load more data into the array stored by each
and return nothingFor example, if you want to load all data at once but only display e.g. 50 at a time, you can do:
const fetchApi = async () => await (await fetch("https://api.example.com/list").json() as string[]
export default function App() {
const [api] = createResource(fetchApi)
const [scrollIndex, setScrollIndex] = createSignal(50)
const scrollNext = () => setScrollIndex(Math.min(scrollIndex() + 50, api().length))
return (
<InfiniteScroll each={api()?.slice(0, scrollIndex())}
hasMore={scrollIndex() < api()?.length}
next={scrollNext}>
{(item, index) =>
<div>{item}</div>
}
</InfiniteScroll>
)
}
FAQs
infinite scroll library for solid-js
The npm package solid-infinite-scroll-fork receives a total of 0 weekly downloads. As such, solid-infinite-scroll-fork popularity was classified as not popular.
We found that solid-infinite-scroll-fork demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.