Skip to content

Instantly share code, notes, and snippets.

View BorisTB's full-sized avatar
🦠
vibin'

Boris BorisTB

🦠
vibin'
  • Prague, Czech Republic
View GitHub Profile
version: '3'
services:
browserless:
image: browserless/chrome
ports:
- "3000:3000"
environment:
- DEBUG=browserless/chrome
- MAX_CONCURRENT_SESSIONS=10
- CONNECTION_TIMEOUT=600000
@BorisTB
BorisTB / App.js
Last active March 17, 2020 13:07
Demo of helper hooks for automatic refetch on sort/pagination change
const App = React.memo(
({
node: {
items: { totalCount, ...items }
},
relay
}) => {
const [fulltext, setFulltext] = useState('')
const fulltextDebounced = useDebounce(fulltext, 300)
const [{ sort, order }, updateSort] = useSort({ sort: 'name', order: 'asc' })