SolidJSS
SolidJSโ€ข3y agoโ€ข
3 replies
stiba

Infinite scrolling solid-start

I'm trying to create something like an infinite scroll.

The data I'm fetching requires api-keys etc, so it has to be done server side.

The initial data fetches fine, since it's being fetched on the server, but when I try to fetch more, it tries to call my api class from the browser, and the api-key are undefined (naturally).

How can I make my fetchMore function only run on the server? Do I need to create an api route ?
Was this page helpful?