[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"navigation_en":3,"/docs/tutorials/state-management-data":144},[4,16,91,117,127],{"title":5,"path":6,"stem":7,"children":8,"icon":15},"Getting Started","/docs/get-started","docs/1.get-started/1.index",[9,11],{"title":10,"path":6,"stem":7},"Introduction",{"title":12,"path":13,"stem":14},"Setup","/docs/get-started/setup","docs/1.get-started/2.setup","mage:fast-forward-fill",{"title":17,"icon":18,"path":19,"stem":20,"children":21,"page":90},"Features","ic:baseline-cable","/docs/features","docs/2.features",[22,26,30,34,38,42,46,50,54,58,62,66,70,74,78,82,86],{"title":23,"path":24,"stem":25},"Database","/docs/features/database","docs/2.features/01.database",{"title":27,"path":28,"stem":29},"Authentication","/docs/features/auth","docs/2.features/02.auth",{"title":31,"path":32,"stem":33},"Payments","/docs/features/payments","docs/2.features/03.payments",{"title":35,"path":36,"stem":37},"Admin Panel","/docs/features/admin-panel","docs/2.features/04.admin-panel",{"title":39,"path":40,"stem":41},"AI","/docs/features/ai","docs/2.features/05.ai",{"title":43,"path":44,"stem":45},"Customization","/docs/features/customization","docs/2.features/06.customization",{"title":47,"path":48,"stem":49},"Storage","/docs/features/storage","docs/2.features/07.storage",{"title":51,"path":52,"stem":53},"Email","/docs/features/email","docs/2.features/08.email",{"title":55,"path":56,"stem":57},"Languages","/docs/features/languages","docs/2.features/09.languages",{"title":59,"path":60,"stem":61},"SEO","/docs/features/seo","docs/2.features/10.seo",{"title":63,"path":64,"stem":65},"Blogs","/docs/features/blogs","docs/2.features/11.blogs",{"title":67,"path":68,"stem":69},"Documentation","/docs/features/documentation","docs/2.features/12.documentation",{"title":71,"path":72,"stem":73},"Cron Jobs","/docs/features/cron-jobs","docs/2.features/13.cron-jobs",{"title":75,"path":76,"stem":77},"Error Handling","/docs/features/error-handling","docs/2.features/14.error-handling",{"title":79,"path":80,"stem":81},"Analytics","/docs/features/analytics","docs/2.features/15.analytics",{"title":83,"path":84,"stem":85},"PWA","/docs/features/pwa","docs/2.features/15.pwa",{"title":87,"path":88,"stem":89},"Customer Support","/docs/features/customer-support","docs/2.features/16.customer-support",false,{"title":92,"icon":93,"path":94,"stem":95,"children":96,"page":90},"Tutorials","ic:baseline-library-books","/docs/tutorials","docs/3.tutorials",[97,101,105,109,113],{"title":98,"path":99,"stem":100},"Project Structure","/docs/tutorials/project-structure","docs/3.tutorials/1.project-structure",{"title":102,"path":103,"stem":104},"Page Routes","/docs/tutorials/page-routes","docs/3.tutorials/2.page-routes",{"title":106,"path":107,"stem":108},"API Calls","/docs/tutorials/api-calls","docs/3.tutorials/3.api-calls",{"title":110,"path":111,"stem":112},"State Management","/docs/tutorials/state-management","docs/3.tutorials/4.state-management",{"title":114,"path":115,"stem":116},"Legal Pages by GPT","/docs/tutorials/legal-pages-by-gpt","docs/3.tutorials/5.legal-pages-by-gpt",{"title":118,"icon":119,"path":120,"stem":121,"children":122,"page":90},"Formatting & Linting","ic:baseline-format-align-left","/docs/formatting-and-linting","docs/4.formatting-and-linting",[123],{"title":124,"path":125,"stem":126},"Overview","/docs/formatting-and-linting/overview","docs/4.formatting-and-linting/1.overview",{"title":128,"icon":129,"path":130,"stem":131,"children":132,"page":90},"Deployment","ic:baseline-rocket-launch","/docs/deployment","docs/5.deployment",[133,136,140],{"title":124,"path":134,"stem":135},"/docs/deployment/overview","docs/5.deployment/1.overview",{"title":137,"path":138,"stem":139},"Vercel","/docs/deployment/vercel","docs/5.deployment/2.vercel",{"title":141,"path":142,"stem":143},"Cloudflare Workers","/docs/deployment/cloudflare","docs/5.deployment/3.cloudflare",{"page":145,"surround":288},{"id":146,"title":110,"body":147,"description":280,"extension":281,"head":282,"meta":283,"navigation":284,"ogImage":282,"path":111,"robots":282,"schemaOrg":282,"seo":285,"sitemap":286,"stem":112,"__hash__":287},"docs_en/docs/3.tutorials/4.state-management.md",{"type":148,"value":149,"toc":271},"minimark",[150,155,166,169,178,220,224,250,255,258,261],[151,152,154],"h2",{"id":153},"tools","Tools",[156,157,158],"ul",{},[159,160,161,165],"li",{},[162,163,164],"strong",{},"useSharedState",": A lightweight wrapper around Vue reactivity that lets multiple pages and components share the same state.",[151,167,12],{"id":168},"setup",[170,171,172,173,177],"p",{},"No extra setup is needed. Call ",[174,175,176],"code",{},"useSharedState()"," anywhere in your components.",[179,180,181,198,209],"ol",{},[159,182,183,186,187],{},[162,184,185],{},"Create shared state",":",[188,189,196],"pre",{"className":190,"code":192,"filename":193,"language":194,"meta":195},[191],"language-text","\u003Cscript setup>\nconst sharedState = useSharedState();\n\u003C/script>\n","vue","text","",[174,197,192],{"__ignoreMap":195},[159,199,200,186,203],{},[162,201,202],{},"Update values",[188,204,207],{"className":205,"code":206,"filename":193,"language":194,"meta":195},[191],"\u003Cscript setup>\nconst sharedState = useSharedState();\nsharedState.value.loading = true;\n\u003C/script>\n",[174,208,206],{"__ignoreMap":195},[159,210,211,186,214],{},[162,212,213],{},"Use it in your page",[188,215,218],{"className":216,"code":217,"filename":193,"language":194,"meta":195},[191],"\u003Ctemplate>\n    \u003Cdiv>\n        {{ sharedState.loading ? 'Loading...' : 'Ready' }}\n    \u003C/div>\n\u003C/template>\n\n\u003Cscript setup>\nconst sharedState = useSharedState();\n\u003C/script>\n",[174,219,217],{"__ignoreMap":195},[151,221,223],{"id":222},"how-to-use","How to use",[156,225,226,233,236],{},[159,227,228,229,232],{},"The same ",[174,230,231],{},"sharedState"," is shared across all pages and components",[159,234,235],{},"If one page updates it, every other page sees the change",[159,237,238,239],{},"Great for:\n",[156,240,241,244,247],{},[159,242,243],{},"Loading states",[159,245,246],{},"User/session info",[159,248,249],{},"Data you don’t want to refetch on every page",[251,252,254],"h3",{"id":253},"quick-way-to-confirm-it-works","Quick way to confirm it works",[170,256,257],{},"Open two pages in your app.\nUpdate sharedState on one page - the other page will update instantly.",[259,260],"hr",{},[170,262,263,264,266,267,270],{},"Think of ",[174,265,164],{}," like a ",[162,268,269],{},"shared notebook",": When one page writes something in it, every other page can read it right away.",{"title":195,"searchDepth":272,"depth":272,"links":273},2,[274,275,276],{"id":153,"depth":272,"text":154},{"id":168,"depth":272,"text":12},{"id":222,"depth":272,"text":223,"children":277},[278],{"id":253,"depth":279,"text":254},3,"Manage and share state across pages and components in your app using the built-in useSharedState composable.'","md",null,{},true,{"title":110,"description":280},{"loc":111},"vyk2cFiFNUXh-BP-rvFPLFt-I_ZVYDufDjbEknrnzdw",[289,291],{"title":106,"path":107,"stem":108,"description":290,"children":-1},"Learn how to make and manage API calls in your app efficiently, connecting your app to external services with ease.",{"title":114,"path":115,"stem":116,"description":292,"children":-1},"Generate Terms of Service and Privacy Policy pages using GPT prompts or the built-in generator tool."]