Open History to see the last commit
1import { useShape } from '@electric-sql/react'
2import { options, type Item } from '../shared'
3
4export function ReactShape() {
5 const { data, isLoading, error } = useShape<Item>(options)
6 if (error) throw error
7 return (
8 <pre data-testid="rows" data-loading={isLoading}>
9 {JSON.stringify(data)}
10 </pre>
11 )
12}