Shivani Kulkarni
Shivani Kulkarni

Reputation: 3

Can Bit.dev support a mix of React and Angular Microfrontends?

How can I leverage Bit.dev to construct Microfrontends from a Monolithic project, incorporating both React and Angular applications? Is it feasible to use Bit.dev for managing and sharing these diverse micro applications built with different frameworks within the same project?"

https://bit.dev/blog/how-to-integrate-bit-into-your-existing-project-the-basics-lg0tpse5/

This article shows how they are using bit for both FE in react and BE in node. Maybe in a similar way I should be able to use react + angular?

Upvotes: -2

Views: 236

Answers (1)

itaymendel
itaymendel

Reputation: 748

The answer to this question is both "yes" and "no".

Yes - you CAN have both Angular and React apps in the same Bit workspace without managing complex dependencies or build pipeline. Bit thinks of each module as a standalone thing. So you can build things "together". I think this was your main question - it is possible to manage both React and Angular in the same workspace.

No - Bit doesn't deal with the runtime aspect of your application, so it does not offer APIs or SDKs for you to side-load both frameworks on the same DOM.

This means that Bit only deals with the build pipeline and isolation of both apps, but not in composing them together. This is a problem you can use different methods to solve. For example, you can build the React app as a UMD bundle, place it in a CDN and load it to Angular with a simple <script> tag.

As a side-note, I would not recommend starting off a project with more than a single framework. This will have negative impact on the application's performance and consistency. Multi-framework setups are fine if you know what you get into (technology migrations or cross-team integration).

Upvotes: 0

Related Questions