Mount React components as custom elements to use them anywhere in HTML, including non-SPA apps and other frameworks.
Remount is a JavaScript library that allows React components to be mounted as custom elements (web components) in the DOM. It solves the problem of integrating React into non-single-page applications (SPAs) or enabling interoperability with other frameworks by treating React components as standard HTML elements.
Developers working on multi-framework projects, legacy applications, or server-rendered sites (e.g., Rails, Phoenix) who need to incrementally adopt React without rewriting their entire stack.
Remount offers a dependency-free, lightweight solution (2kb gzipped) that bridges React with the native web component ecosystem, providing broad browser support and simple integration compared to more complex alternatives.
Mount React components to the DOM using custom elements
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
At 2kb gzipped with no dependencies, Remount adds minimal load to your application, as highlighted in the README's bundle size badge.
Supports all browsers that React 18 supports, including IE via fallbacks, ensuring broad compatibility without polyfills.
Enables React components to work alongside Vue, Angular, or any DOM library by defining them as custom elements, perfect for multi-framework projects as shown in the use cases.
Provides an easy define() API to add React to server-rendered pages in frameworks like Rails or Phoenix with minimal code, ideal for gradual adoption.
Passing props through JSON attributes or named attributes can be verbose and error-prone for complex data, limiting scalability and developer experience.
Requires React 18, which may force upgrades in projects using older React versions, adding migration overhead and compatibility risks.
Lacks built-in support for React's modern patterns like suspense or concurrent rendering, requiring additional work for optimal performance.