Nuxt/docs/3.api/3.utils/update-app-config.md
Sébastien Chopin f26a801775
docs: update to new website (#23743)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Daniel Roe <daniel@roe.dev>
2023-10-18 12:59:43 +02:00

630 B

title description links
updateAppConfig Update the App Config at runtime.
label icon to size
Source i-simple-icons-github https://github.com/nuxt/nuxt/blob/main/packages/nuxt/src/app/config.ts xs

::callout Updates the app.config using deep assignment. Existing (nested) properties will be preserved. ::

Usage

const appConfig = useAppConfig() // { foo: 'bar' }

const newAppConfig = { foo: 'baz' }

updateAppConfig(newAppConfig)

console.log(appConfig) // { foo: 'baz' }

:read-more{to="/docs/guide/directory-structure/app-config"}