react

Guide React development with component patterns, hooks, and query-language UI translation.

476|102|Updated Oct 26, 2022
One-click install
npx skills add https://github.com/aws/graph-explorer --skill react-aws
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react
Source: https://github.com/aws/graph-explorer/tree/main/.kiro/skills/react
Command: npx skills add https://github.com/aws/graph-explorer --skill react-aws

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides guidance on modern React development, focusing on component patterns, hooks, naming conventions, and a unique query-language translation system for Graph Explorer.

Core Features & Use Cases

  • Component Best Practices: Encourages functional components, single responsibility, and efficient state management.
  • Hook Usage: Details naming conventions and preferred usage patterns for custom hooks.
  • Query-Language Translation: Explains how UI labels are dynamically swapped based on the active graph database query language (Gremlin, openCypher, SPARQL).
  • Use Case: Ensure consistency and maintainability in the Graph Explorer frontend by adhering to these established React patterns and the specialized translation system.

Quick Start

Use the react skill to understand how to implement custom hooks following the use prefix naming convention.

Frequently Asked Questions about react

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

FAQPage Schema
What are the best practices for React component patterns and state management?

React component patterns should favor functional components and the context API over prop drilling to ensure single responsibility and efficient state management. This approach enforces modern practices for consistency and maintainability across your frontend.

How do I implement custom hooks following the use prefix naming convention?

To implement custom hooks, apply the `use` prefix naming convention to clearly identify hook usage patterns. This standardizes hook integration, ensuring functional components maintain efficient state and logic reuse without class-based overhead.

How does the UI translation system work for Gremlin, openCypher, and SPARQL query engines?

The UI translation system uses a JSON-based mechanism to dynamically swap labels based on the active graph database query language. It translates UI components contextually for Gremlin, openCypher, or SPARQL environments.

When should I use the context API instead of prop drilling in React?

You should use the context API instead of prop drilling when managing state across multiple React components to maintain single responsibility. This avoids deeply nested props and enforces modern, maintainable frontend architecture.

How do I dynamically translate UI labels based on graph database query languages?

Dynamically translate UI labels by utilizing a JSON-based translation mechanism tailored for Graph Explorer. This system dynamically swaps interface text based on whether Gremlin, openCypher, or SPARQL is the active query engine.