组件库 - 显示索引

Components Library - Show Index

我正在构建一个可在多个内部项目之间共享的可重用 React 组件的存储库。 我想要一个索引文件,用于在单个页面中显示所有组件,如演示。

关于如何在保持索引的同时进行这样的索引,是否有最佳实践或建议automatic/generic? (这样新创建的组件也会自动添加到索引网页)

使用 Storybook 项目作为您的 UI 开发环境如何?

故事书

Storybook is a UI development environment for your UI components. With it, you can visualize different states of your UI components and develop them interactively.

Storybook runs outside of your app. So you can develop UI components in isolation without worrying about app specific dependencies and requirements.

开始使用

npm i -g @storybook/cli
cd my-react-app
getstorybook