Do you often end up writing similar component across multiple projects? Sometimes do you feel you could use a private NPM registry and maintain all components to share across projects. But in an agile development team; it can be challenging to pack, publish and maintain multiple components. Also once its published, you can’t easily make minor changes directly from your current project.
React components are not like libraries, they evolve at a higher pace, developers build new capabilities and extensions to components to meet application requirements.
You cannot pack it and publish on NPM like other libraries & tools. To make a small change you cannot setup an isolated workspace & introduce changes rather you would want to play around with the component in the current project itself. Once you are happy with your changes, you would wish to push these changes. Bit exactly makes this workflow possible. Import your component to your project with its source, tweak it, export, eject and its updated version is available to the rest of the team. Simple?
Bit is powerful & makes React developers life a lot easy. Its like a fusion of git & NPM just for components. Bit allows true component-driven development and treat components like first class citizens in software development lifecycle.
Bit is a great component workbench for React. The functional nature of React components makes Bit ideal for React. It helps a lot in saving the overhead of keeping all your components in separate repositories. You can kickoff your own component library with ease.
Make changes to your component on the spot
Bit enables you to make the change to your component literally within your current project. You don’t need to step out of your project, you can direct import the source and make your changes on the spot and experiment with your component.
You can test your changes even before publishing it. Bit makes this powerful workflow possible.
Improve discoverability of components
Bit is built for components & not libraries thus makes component discovery better; you can browse through the component collection developed by your team.
Search & preview the components & reuse suitable ones in your projects. Bit becomes your mini component marketplace for your team to pick from.
This distributed workflow model allows developers to import components to their projects. Bit allows you and your team to truly share code effortlessly.
Thus it allows your team to collaborate and build meaningful shared components instead of write similar logic for components in a multi-project environment.
Isolate your Component
Bit gives you the ability to assign your component compilers, essentially they are environments. It’s a special kind of extension, in order to build components. You can also write custom compilers to fit your own requirements. Also, Bit uses testers to run test cases against your components to ensure your changes don’t break.
This experience adds a new level of flexibility and speed to development workflow. Bit makes it a lot more simpler to share components across apps, team members, and use them to build new things faster.
Cheers and thanks for reading! 👏
Start building your React applications like with bit.dev.
(Originally published on codeburst.io medium)