.agents/skills/react-component-guidelines/SKILL.md
Components are useful because they act as an encapsulated unit and therefore promote composition. For this to work, a component needs to be isolatable and neither leak implementation details nor depend on its placement or usage context. The interface of a component is defined by its props, and therefore the props should be designed to be as explicit and unambiguous as possible.
onClick & onSelect)mode changes the entire interaction.Pick<> over Omit<> for prop types as this is more explicit.Pick<>loading and data type in the prop, then it should not be possible to have a state where loading is true and data is not null)null or undefined. Most of the time this suggests that the condition that leads to this state should be handled by the parent component instead, often this can be done in a way close to the current component by using a hook or a HOC.