V9: Custom Component Recipe #26689
-
Hi, Please provide some examples of how we should create custom components the V9 way? (ComponentProps, Slots,renderers,.....) Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
For downstream components built on v9, there is no hard requirement that you use component props, slots etc. These are conventions that we are using to keep our components as customizable as possible. As for how we build v9 controls, one way to see our current best practice is to clone our repo and use the |
Beta Was this translation helpful? Give feedback.
-
@micahgodbolt, thank you for your answer. I have been studying the react-components code in the hope of creating and migrating my v8 components to v9, following the MS style and standards. I would like to know why several of the functions (also in the template) are postfixed by |
Beta Was this translation helpful? Give feedback.
For downstream components built on v9, there is no hard requirement that you use component props, slots etc. These are conventions that we are using to keep our components as customizable as possible.
As for how we build v9 controls, one way to see our current best practice is to clone our repo and use the
yarn create-package
andyarn create-component
commands. As we refine our approach, we move our best practices into those templates.