React Structure a React Component Structure a React component by deciding its responsibility, naming props clearly, keeping state close to where it is used and separating reusable UI from page-specific content.
Problem statement What this workflow solves Target outcome A React component that is easier to reuse, test, style and connect to real product workflows.
Use this when You need a repeatable workflow, not a one-off article. You want tools, references and UI guidance in one place. You want a short implementation plan you can copy. type ReactComponentProps = {
title: string;
description: string;
};
export function ReactComponent({
title,
description,
}: ReactComponentProps) {
return (
<section aria-labelledby="structure-react-component-title">
<h2 id="structure-react-component-title">{title}</h2>
<p>{description}</p>
</section>
);
}Name the component after the UI role it performs.
Use clear prop names instead of implementation details.
Keep local UI state inside the component.
Putting unrelated layout, data and interaction logic into one component.
Adding too many boolean props instead of composing smaller pieces.
Duplicating derived values in component state.
1 Define the component responsibility A component is easier to maintain when it has one clear job and predictable inputs.
Name the component after the UI role it performs. Avoid mixing data fetching, layout and low-level controls in one component. Pass content through props or children when reuse matters. 2 Design the props API Props should make common use cases easy and unusual cases possible without adding noise.
Use clear prop names instead of implementation details. Keep boolean props limited and meaningful. Prefer composition when variants become too complex. 3 Handle state deliberately State should live where it is needed and be lifted only when another component must coordinate it.
Keep local UI state inside the component. Lift state when sibling components need the same value. Avoid duplicating derived values in state. ElementYard CTA Prototype React-ready UI in ElementYard Use ElementYard to explore component layout and visual variants before implementing React boundaries.
Open ElementYard Should every React component be reusable? No. Page-specific components are fine, but shared components should have clear props, accessible defaults and predictable variants.
When should I split a React component? Split it when one part has a separate responsibility, is reused elsewhere or makes the parent component hard to scan.
More guides Build a Landing Page A practical landing page workflow for planning sections, writing copy, checking accessibility and preparing reusable UI components. Launch a Website A practical website launch checklist covering content, metadata, accessibility, sitemap, robots, performance and final link checks. Flexbox vs Grid Learn when to use CSS flexbox or grid for practical responsive layouts, navigation, cards, page sections and interface alignment.