Skip to content

Commit 0fe0035

Browse files
Mention DOM selector issues with stateless components
1 parent 810eafd commit 0fe0035

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ We'll review your code, suggest any needed changes, and merge it in. Thank you.
4646
## Understanding Controlled and Uncontrolled Components
4747
- All new components should be controlled at first and then uncontrolled support added later if needed.
4848
- All Design System React components should be able to be "controlled"--that is expose a callback and expect their parent to control them with props.
49-
- Please note that if controlled by its parent, a component will appear broken if just copied and pasted into an application without a parent to control its value.
50-
- Controlled components can be stateless components.
49+
- Please note that if controlled by its parent, a component will appear broken if just copied and pasted into an application without a parent to control its props.
50+
- Controlled components can be stateless components, but entirely stateless components do complicate DOM selectors for the consuming applications.
5151

5252
A **controlled** `<input>` has a `value` prop. Rendering a controlled `<input>` will reflect the value of the `value` prop.
5353

0 commit comments

Comments
 (0)