Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Use your React components anywhere in your
HTML as web components (custom elements).
Demo ⚡ Docs
2kb gzip'd · No dependencies · IE support
Remount is available through the npm package repository.
yarn add remount
npm install remount
Let's start with any React component. Here's one:
const Greeter = ({ name }) => {
return <div>Hello, {name}!</div>
}
Use define() to define custom elements. Let's define a <x-greeter>
element:
import { define } from 'remount'
define({ 'x-greeter': Greeter })
You can now use it anywhere in your HTML! :boom:
<x-greeter props-json='{"name":"John"}'></x-greeter>
Some ideas on why you might want to consider Remount for your project:
✨ Adding React to non-SPA apps You can use React components on any page of a "regular" HTML site. Great for adding React to apps built on Rails or Phoenix. | |
💞 Interop with other frameworks Remount lets you use your React components just like any other HTML element. This means you can use React with Vue, Angular, or any other DOM library/framework. |
<x-greeter props-json="{...}">
) (docs)<x-greeter name="John">
) (docs)Remount supports all browsers that React support, which includes IE11. Legacy IE support (IE9) is available using polyfills.
Custom Elements API# ("Web Components") will be used if it's available (Chrome/67+), and will fallback to a compatible API otherwise.
remount © 2018, Rico Sta. Cruz. Released under the MIT License.
Authored and maintained by Rico Sta. Cruz with help from contributors (list).
ricostacruz.com · GitHub @rstacruz · Twitter @rstacruz
FAQs
Mount React components to the DOM using custom elements
The npm package remount receives a total of 5,099 weekly downloads. As such, remount popularity was classified as popular.
We found that remount demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.