[{"data":1,"prerenderedAt":399,"buildId":400},["ShallowReactive",2],{"-get-started-watch-outs":3,"-get-started-watch-outs-surround":300,"navigation_docs":311},{"id":4,"title":5,"body":6,"description":68,"extension":291,"links":292,"meta":293,"navigation":294,"path":296,"seo":297,"stem":298,"__hash__":299},"docs\u002F1.get-started\u002F5.watch-outs.md","Watchouts",{"type":7,"value":8,"toc":286},"minimark",[9,13,18,42,61,130,141,147,162,168,179,183,186,193,196,205,208,257,261,268,275,282],[10,11,12],"p",{},"This page aims to succinctly mention things to watch out for when building your Nuxt-powered Ionic application, particularly for those familiar with regular Nuxt and Vue applications.",[14,15,17],"h2",{"id":16},"pages-and-navigation","Pages and Navigation",[19,20,22],"list",{"type":21},"warning",[23,24,25],"ul",{},[26,27,28,29,33,34,37,38,41],"li",{},"Avoid using ",[30,31,32],"code",{},"\u003CNuxtPage>",", ",[30,35,36],{},"\u003CNuxtLayout>"," or ",[30,39,40],{},"\u003CNuxtLink>",". These are currently not integrated with this module.",[10,43,44,45,48,49,52,53,56,57,60],{},"Instead, Ionic expects ",[30,46,47],{},"\u003Cion-router-outlet>"," to show the route component, and ",[30,50,51],{},"useIonRouter()"," or the ",[30,54,55],{},"router-link"," property on any ",[30,58,59],{},"ion-"," component to change page.",[62,63,69],"pre",{"className":64,"code":65,"filename":66,"language":67,"meta":68,"style":68},"language-vue shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u003Ctemplate>\n  \u003Cion-app>\n    \u003Cion-router-outlet \u002F>\n  \u003C\u002Fion-app>\n\u003C\u002Ftemplate>\n","app.vue","vue","",[30,70,71,87,98,110,120],{"__ignoreMap":68},[72,73,76,80,84],"span",{"class":74,"line":75},"line",1,[72,77,79],{"class":78},"sMK4o","\u003C",[72,81,83],{"class":82},"swJcz","template",[72,85,86],{"class":78},">\n",[72,88,90,93,96],{"class":74,"line":89},2,[72,91,92],{"class":78},"  \u003C",[72,94,95],{"class":82},"ion-app",[72,97,86],{"class":78},[72,99,101,104,107],{"class":74,"line":100},3,[72,102,103],{"class":78},"    \u003C",[72,105,106],{"class":82},"ion-router-outlet",[72,108,109],{"class":78}," \u002F>\n",[72,111,113,116,118],{"class":74,"line":112},4,[72,114,115],{"class":78},"  \u003C\u002F",[72,117,95],{"class":82},[72,119,86],{"class":78},[72,121,123,126,128],{"class":74,"line":122},5,[72,124,125],{"class":78},"\u003C\u002F",[72,127,83],{"class":82},[72,129,86],{"class":78},[19,131,132],{"type":21},[23,133,134],{},[26,135,136,137,140],{},"The root element of every page must always be ",[30,138,139],{},"\u003Cion-page>",".",[10,142,143,144,146],{},"This is required by Ionic to set up page transitions and stack navigation. Each view that is navigated to using the router must include an ",[30,145,139],{}," component.",[19,148,149],{"type":21},[23,150,151],{},[26,152,153,154,157,158,161],{},"When navigating from a tabbed route to a non-tabbed route, ",[30,155,156],{},"route.params"," from the auto-imported ",[30,159,160],{},"useRoute()"," will always be an empty object.",[10,163,164,165,140],{},"A current workaround is to ",[30,166,167],{},"import { useRoute } from 'vue-router';",[169,170,173,174,140],"callout",{"color":171,"icon":172},"info","i-lucide-info","Read more ",[175,176,178],"a",{"href":177},"\u002Foverview\u002Frouting","about routing here",[14,180,182],{"id":181},"lifecycle-hooks","Lifecycle Hooks",[10,184,185],{},"Ionic handles lifecycle events slightly differently to Vue, as it persists some components in the DOM when Vue would usually unmount them.",[10,187,188,189,192],{},"This means the various mounted hooks, e.g. ",[30,190,191],{},"onBeforeMount",", may not be called when you would expect them to.",[10,194,195],{},"To help with this, Ionic has added extra lifecycle hooks which behave how you may have expected the mounted hooks to behave.",[169,197,198,199,140],{"color":171,"icon":172},"Read about the ",[175,200,204],{"href":201,"rel":202},"https:\u002F\u002Fionicframework.com\u002Fdocs\u002Fvue\u002Flifecycle",[203],"nofollow","Ionic Vue lifecycle hooks here",[10,206,207],{},"Because of this, some expected functionality from Nuxt or other modules may not work or may require changes to get functioning:",[19,209,210],{"type":21},[23,211,212,233],{},[26,213,214,140,222,225,226,230,231],{},[215,216,217,218,221],"strong",{},"The composable ",[30,219,220],{},"useHead()"," will not work out of the box",[223,224],"br",{},"\nSee ",[175,227,229],{"href":228},"\u002Fcookbook\u002Fpage-metadata","our cookbook page"," for how to continue using ",[30,232,220],{},[26,234,235,140,238,240,241,33,244,247,248,251,252,140],{},[215,236,237],{},"Certain Vue Router components should not be used",[223,239],{},"\nThis includes ",[30,242,243],{},"\u003Ckeep-alive>",[30,245,246],{},"\u003Ctransition>",", and ",[30,249,250],{},"\u003Crouter-view>"," - ",[175,253,256],{"href":254,"rel":255},"https:\u002F\u002Fionicframework.com\u002Fdocs\u002Fvue\u002Flifecycle#how-ionic-framework-handles-the-life-of-a-page",[203],"read more here",[14,258,260],{"id":259},"no-serverside-rendering","No serverside rendering",[19,262,263],{"type":21},[23,264,265],{},[26,266,267],{},"The application code cannot contain any serverside rendering.",[10,269,270,271,140],{},"When targeting iOS or Android devices, the build must be able to run completely on the clientside. We discuss ",[175,272,274],{"href":273},"\u002Fcookbook\u002Fweb-and-device","solutions for if you're targeting both web and device here",[169,276,277,278,140],{"color":171,"icon":172},"Learn more about ",[175,279,281],{"href":280},"\u002Fcookbook\u002Fcreating-ios-android-apps","building for native devices here",[283,284,285],"style",{},"html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":68,"searchDepth":89,"depth":89,"links":287},[288,289,290],{"id":16,"depth":89,"text":17},{"id":181,"depth":89,"text":182},{"id":259,"depth":89,"text":260},"md",null,{},{"icon":295},"uil:exclamation-triangle","\u002Fget-started\u002Fwatch-outs",{"title":5,"description":68},"1.get-started\u002F5.watch-outs","e1DEiin7aM-RRbfzr_DnznKYRQ2E88uU3N6W2F1Qd0I",[301,306],{"title":302,"path":303,"stem":304,"description":68,"icon":305,"children":-1},"Enabling Capacitor","\u002Fget-started\u002Fenabling-capacitor","1.get-started\u002F4.enabling-capacitor","nonicons:capacitor-16",{"title":307,"path":177,"stem":308,"description":309,"icon":310,"children":-1},"Routing","2.overview\u002F1.routing","Routing within your Nuxt Ionic application will feel very similar, but with a couple of differences.","uil:sign-alt",[312,336,368],{"icon":313,"redirect":314,"title":315,"path":316,"stem":317,"children":318,"page":335},"heroicons-outline:star","\u002Fget-started\u002Fintroduction","Get Started","\u002Fget-started","1.get-started",[319,323,328,333,334],{"title":320,"path":314,"stem":321,"icon":322},"Introduction","1.get-started\u002F1.introduction","uil:info-circle",{"title":324,"path":325,"stem":326,"icon":327},"Installation","\u002Fget-started\u002Finstallation","1.get-started\u002F2.installation","uil:play-circle",{"title":329,"path":330,"stem":331,"icon":332},"Configuration","\u002Fget-started\u002Fconfiguration","1.get-started\u002F3.configuration","uil:wrench",{"title":302,"path":303,"stem":304,"icon":305},{"title":5,"path":296,"stem":298,"icon":295},false,{"icon":337,"redirect":177,"title":338,"path":339,"stem":340,"children":341,"page":335},"heroicons-outline:sparkles","Overview","\u002Foverview","2.overview",[342,343,348,353,358,363],{"title":307,"path":177,"stem":308,"icon":310},{"title":344,"path":345,"stem":346,"icon":347},"Theming","\u002Foverview\u002Ftheming","2.overview\u002F2.theming","uil:palette",{"title":349,"path":350,"stem":351,"icon":352},"Ionic Auto-Imports","\u002Foverview\u002Fionic-auto-imports","2.overview\u002F3.ionic-auto-imports","uil:channel",{"title":354,"path":355,"stem":356,"icon":357},"Module Utilities","\u002Foverview\u002Fmodule-utilities","2.overview\u002F4.module-utilities","uil:layer-group",{"title":359,"path":360,"stem":361,"icon":362},"Icons","\u002Foverview\u002Ficons","2.overview\u002F5.icons","uil:illustration",{"title":364,"path":365,"stem":366,"icon":367},"Deployment","\u002Foverview\u002Fdeployment","2.overview\u002F6.deployment","uil:rocket",{"icon":369,"redirect":370,"title":371,"path":372,"stem":373,"children":374,"page":335},"heroicons-outline:bookmark-alt","\u002Fcookbook\u002Fcustomising-app-vue","Cookbook","\u002Fcookbook","3.cookbook",[375,378,382,386,389,392,395],{"title":376,"path":370,"stem":377},"Customising app.vue","3.cookbook\u002F1.customising-app-vue",{"title":379,"path":380,"stem":381},"Local Development","\u002Fcookbook\u002Flocal-development","3.cookbook\u002F2.local-development",{"title":383,"path":384,"stem":385},"App Tabs","\u002Fcookbook\u002Fapp-tabs","3.cookbook\u002F3.app-tabs",{"title":387,"path":228,"stem":388},"useHead \u002F Page Meta","3.cookbook\u002F4.page-metadata",{"title":390,"path":280,"stem":391},"iOS and Android Apps","3.cookbook\u002F5.creating-ios-android-apps",{"title":393,"path":273,"stem":394},"Web And Device","3.cookbook\u002F6.web-and-device",{"title":396,"path":397,"stem":398},"Live Updates","\u002Fcookbook\u002Flive-updates","3.cookbook\u002F7.live-updates",1795608203490,"1d8de719-76dd-4431-8503-a56c8caa5d09"]