2022-08-24 16:35:02 +00:00
|
|
|
# `updateAppConfig`
|
|
|
|
|
2022-11-28 12:47:32 +00:00
|
|
|
Updates [app config](/docs/guide/directory-structure/app-config) using deep assignment. Existing (nested) properties will be preserved.
|
2022-08-24 16:35:02 +00:00
|
|
|
|
|
|
|
**Usage:**
|
|
|
|
|
|
|
|
```js
|
2023-06-05 15:03:06 +00:00
|
|
|
const appConfig = useAppConfig() // { foo: 'bar' }
|
2022-08-24 16:35:02 +00:00
|
|
|
|
|
|
|
const newAppConfig = { foo: 'baz' }
|
|
|
|
|
|
|
|
updateAppConfig(newAppConfig)
|
|
|
|
|
|
|
|
console.log(appConfig) // { foo: 'baz' }
|
|
|
|
```
|
|
|
|
|
2022-11-28 12:47:32 +00:00
|
|
|
::ReadMore{link="/docs/guide/directory-structure/app-config"}
|