

Making changes to the shared component was quick and easy though. There was a little bit of back and forth between projects as I realized changes that I needed to make. This was a pretty simple process of installing the package with npm and updating the parent component to use the component from bit. Once the component was exported, I was ready to use it in our other project.
#DEVDOCS OFFICE 404 UPDATE#
Bit makes this pretty easy to do with an update to the package.json file: "bit": Īfter that, I built my component, tagged it with a new version and exported it to my bit collection: įrom there, I modified my original component project to use the new compiler instead of the standard one. babelrc file in the react compiler and exported it to my own collection. Instead, I forked the repository, cleaned out the compilers I did not need, modified the. It kept bringing in a lot of extra files that did not make sense to me.
#DEVDOCS OFFICE 404 HOW TO#
I could not figure out how to cleanly use the bit import command for importing the compiler and modifying it.
#DEVDOCS OFFICE 404 CODE#
I could have modified our code to not use that syntax (in this case the ? nullish coalescing operator), but that felt like a cheap fix that would ultimately cause more problems in the long term. Once I figured that out, it was a few more hours of modifying the react compiler for bit to include the Babel plugins that I needed. babelrc settings that are included in react-scripts. Finally, I figured out that the React compiler for bit does not include the same. This led to a lot of confusing and cursing. My component built locally, but it did not build once I exported it to my collection. Obstacle #1 - The default bit React compiler does not contain all of the Babel plugins that we use in our components It does a little more than that behind the scenes, but those are the basics. It combines a search input with displaying a list of results where the user can select a single result. I selected one of our more complex components to start with because I’m a sucker for punishment.

Lessons learned in sharing my first react componentĪt my current company, we have three products with similar components and functionality.
