Skip to content

Commit

Permalink
Use ref in usePage to attempt to reduce unwanted reconnections
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobmischka committed Jul 24, 2023
1 parent 27c6615 commit 5adea62
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/examples/basic/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { IntervalActionDefinition } from '@interval/sdk/src/types'
import { IntervalActionHandler, Action, Page, Layout, io } from '../..'
import { faker } from '@faker-js/faker'
import fakeUsers from '../utils/fakeUsers'
import { generateRows } from '../utils/helpers'
import { generateRows, sleep } from '../utils/helpers'
import { asyncTable } from '../utils/ioMethodWrappers'
import dedent from 'dedent'
import { HighlightColor } from '../../ioSchema'
Expand Down Expand Up @@ -243,6 +243,23 @@ export const multiple_tables: IntervalActionHandler = async io => {
])
}

export const multiple_async_tables = new Page({
name: 'Multiple async tables',
handler: async () => {
await sleep(200)

return new Layout({
children: [
asyncTable(100),
asyncTable(300),
asyncTable(800),
asyncTable(300),
asyncTable(200),
],
})
},
})

export const big_payload_table = new Page({
name: 'Big table',
handler: async () => {
Expand Down

0 comments on commit 5adea62

Please sign in to comment.