webiny-admin-env-config-catalog

Catalogs EnvConfig and useEnvConfig abstractions for accessing environment configuration in Webiny admin apps.

8.0k|673|Updated Jan 9, 2018
One-click install
npx skills add https://github.com/webiny/webiny-js --skill webiny-admin-env-config-catalog
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: webiny-admin-env-config-catalog
Source: https://github.com/webiny/webiny-js/tree/main/skills/user-skills/generated/admin/env-config
Command: npx skills add https://github.com/webiny/webiny-js --skill webiny-admin-env-config-catalog

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers building Webiny admin extensions need a reliable way to discover and correctly import the environment configuration abstractions without guessing import paths or type signatures.

Core Features & Use Cases

  • Abstraction Catalog: Lists the EnvConfig abstraction and the useEnvConfig hook with exact import paths and source file locations.
  • DI-Based Access: Shows how to retrieve the EnvConfig instance from the dependency injection container inside React components and hooks.
  • Use Case: When building a custom admin plugin that needs runtime environment values, look up useEnvConfig here, read the referenced source file for its interface, and import it via the documented path.

Quick Start

Ask the assistant to show how to access environment configuration inside a Webiny admin React component using the useEnvConfig hook.

Frequently Asked Questions about webiny-admin-env-config-catalog

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I access environment config in a Webiny admin component?

Use the useEnvConfig hook imported from webiny/admin/env-config. It returns the EnvConfig instance from the dependency injection container, making it usable inside React components and hooks.

What is the EnvConfig abstraction in Webiny?

EnvConfig is an abstraction exported from webiny/admin/env-config, defined in @webiny/app/features/envConfig/index.ts. It provides access to environment configuration values within the Webiny admin application.

Where is the useEnvConfig hook source code located?

The useEnvConfig hook is defined in @webiny/app/presentation/envConfig/useEnvConfig.ts. Reading this file gives you the exact interface and return types before using it in your code.

Can I use EnvConfig outside of React components?

EnvConfig itself is a standalone abstraction that can be imported directly from webiny/admin/env-config. The useEnvConfig hook is specifically for accessing it via DI inside components and hooks.