Skip to main content

Basic Usage

Get all configurations as a reactive object:
Perfect for when you need multiple configurations or want to iterate over all of them.

Return Values

configs: Object with all configuration key-value pairs isRefreshing: True while fetching fresh data error: Error object if fetch failed refresh: Function to manually refresh all configs

When to Use

Use useAllConfigs when you:
  • Need multiple configuration values
  • Want to build a configuration dashboard
  • Need to apply styles from multiple configs
  • Want to iterate over all available configs
Use useConfig when you:
  • Only need one or two specific values
  • Want to minimize re-renders (only updates when specific config changes)

Styling Example

Apply multiple configs for styling:

Cache-First Loading

Like useConfig, this hook uses cache-first strategy:
Renders immediately with cached values, then refreshes in background.

Manual Refresh

Force refresh all configurations:

With Personalization

Pass properties to get personalized configuration set:
All returned configurations are evaluated based on these properties.

Error Handling

Handle errors gracefully:
Even if fetch fails, configs still contains cached/default values.

Configuration Dashboard Example

Build a dashboard to view all configs:

Multi-Config Form

Use configs to control a form:

Performance Consideration

useAllConfigs causes re-renders when ANY configuration changes. If you only need specific values, use useConfig instead for better performance:

Comparing to useConfig

Both are valid. Choose based on your needs.

Next Steps

useConfig

Get single configuration values

Remote Config

Learn about remote configuration

Personalization Guide

Build personalized experiences