Skip to content

Commit

Permalink
Compose application options doc
Browse files Browse the repository at this point in the history
  • Loading branch information
epessina committed Oct 25, 2024
1 parent 2e8f969 commit 3c57b9a
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/docs/guides/applications/compose.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ interface ComposableApplication {
integrationMode: "compose"
config: PluginConfiguration | string // See explanation below
route: string // Path on which the composable application will be rendered
options?: ComposableApplicationOptions // See explanation below
}
```

Expand Down Expand Up @@ -464,3 +465,27 @@ layout:
```mdx-code-block
</div>
```

## Application options

:::caution
Application options are available starting form <micro-lc></micro-lc> version `2.4.2` and `@micro-lc/composer` version `2.2.0`
:::

A set of options can be passed along in the application configuration through the `options` keyword. Options are an optional object with the following structure:

```typescript
interface ComposableApplicationOptions {
fetchConfigOnMount?: boolean
}
```

### `fetchConfigOnMount`

By default, <micro-lc></micro-lc> retrieves compose applications configurations just once, at _bootstrap_ (i.e., the first time the user navigates to them). At any subsequent visit, configurations are retrieved from an in-memory cache during the _mount_ stage of the application lifecycle.

If you need to re-fetch the configuration each time an application is visited, you can instruct <micro-lc></micro-lc> to do so by setting the `fetchConfigOnMount` option to `true`.

:::caution
This option will have effect only on applications that specify a **URL string** in the `config` key.
:::

0 comments on commit 3c57b9a

Please sign in to comment.