Skip to content
Discussion options

You must be logged in to vote

The $ prefix for transient props is by design. It provides a simple, zero-config mechanism to prevent custom props from leaking to the DOM — React warns when unknown props are passed to HTML elements.

The alternative before transient props was using .withConfig({ shouldForwardProp }) on every component or wrapping with StyleSheetManager shouldForwardProp={...} globally (e.g. with @emotion/is-prop-valid). The $ convention is opt-in and avoids that boilerplate.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by quantizor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants