Basic Usage
Get all configurations as a reactive object:Return Values
When to Use
UseuseAllConfigs 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
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
LikeuseConfig, this hook uses cache-first strategy:
Manual Refresh
Force refresh all configurations:With Personalization
Pass properties to get personalized configuration set:Error Handling
Handle errors gracefully: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
| Feature | useAllConfigs | useConfig |
|---|---|---|
| Returns | All configs | Single config |
| Re-renders | Any config change | Specific config change |
| Use for | Multiple values, iteration | Single or few values |
| Performance | Broader re-renders | Optimized re-renders |