Back to stack guides
react-component-system
React Component System
Model state explicitly, preserve semantic elements, keep component ownership local, and avoid unsafe HTML or unnecessary effects.
Stack guidesContextual
Intent
Produce maintainable UI behavior without over-abstracted components, duplicated state, or unsafe rendering escape hatches.
Checks
- Use native controls and controlled state only where the workflow needs it.
- Keep effects for synchronization with external systems, not derived render data.
- Render untrusted content as text or sanitized data, never directly through unsafe HTML.
Warnings
- Generic components with many boolean props often hide unclear ownership and state combinations.
Exceptions
- A vetted rich-text pipeline may render sanitized HTML through a tightly controlled boundary.