Skip to content
Source
Sign inSign up
samwillis/neon-realtime-electric
Open History to see the last commit

index.tsx

12 lines323 Bytes

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 )