as
Prop
Sources:
Overview
TIP
Utilize the
as
component property to compose components in React. This way you can change the underlying element of a composed component or combine it with another component (i.e. render acheckbox
component as abutton
element).
NOTE
The topmost component (i.e.
checkbox
in the example above) will take precedence if there is a conflict betweenprops
.
Code Snippet
src/components/Example.tsx
Details
See Also
- JavaScript Map of Content
- JavaScript Code
- Hyper Text Markup Language (HTML)
- Cascading Style Sheets (CSS)
- React.js
- Next.js
Appendix
Note created on 2024-04-30 and last modified on 2024-04-30.
Backlinks
(c) No Clocks, LLC | 2024