Open History to see the last commit
1import { createServerFn } from '@tanstack/react-start'
2β
3export const getPunkSongs = createServerFn({
4 method: 'GET',
5}).handler(async () => [
6 { id: 1, name: 'Teenage Dirtbag', artist: 'Wheatus' },
7 { id: 2, name: 'Smells Like Teen Spirit', artist: 'Nirvana' },
8 { id: 3, name: 'The Middle', artist: 'Jimmy Eat World' },
9 { id: 4, name: 'My Own Worst Enemy', artist: 'Lit' },
10 { id: 5, name: 'Fat Lip', artist: 'Sum 41' },
11 { id: 6, name: 'All the Small Things', artist: 'blink-182' },
12 { id: 7, name: 'Beverly Hills', artist: 'Weezer' },
13])