How it works
The framework handles the data fetching for you. TheParameterProvider is already configured in your main layout, so you don’t need to worry about retrieving the data from the API manually. It automatically loads all public parameters created in the Strapi backend.
Check the backend documentation to learn how to create and manage parameters in the
admin panel.
Accessing Parameters
To use a parameter in your component, you use theuseParameter hook. This hook gives you access to the get function, which retrieves the value of a parameter by its unique identifier (UID).
Step 1: Import the hook
First, import theuseParameter hook from the core context.
Step 2: Retrieve the value
Call the hook inside your component to get the parameter instance. Then, usage the.get() method with the parameter’s UID to get its value.