React's true strength lies in "the ability to compose components into larger components." This increases code cohesion by keeping logic, styles, and markup together in one place. Nesting multiple conditions (
isPending, !data, data) within JSX for rendering different states increases cognitive load and makes the code harder to read.- Extract the common UI structure (layout) into a separate
Layoutcomponent.
- Use early return for state-based UI instead of JSX conditionals.

Seonglae Cho
