hey thanks for the info, do we define it outside of the router/crawler like this? and then use state variable
import { createPlaywrightRouter , useState} from 'crawlee';
export const router = createPlaywrightRouter();
const state = await useState("test", {"val":12})
router.addDefaultHandler(async ({ enqueueLinks, log }) => {
log.info(`enqueueing new URLs`);
await enqueueLinks({
globs: ['https://crawlee.dev/**'],
label: 'detail',
});
});
router.addHandler('detail', async ({ request, page, log, pushData, }) => {
const title = await page.title();
log.info(`${title}`, { url: request.loadedUrl });
await pushData({
url: request.loadedUrl,
title,
});
});