
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
html-email-for-react
Advanced tools
An HTML processor that makes it easy to enrich HTML templates with rich React components
An HTML processor that makes it easy to enrich HTML templates with rich React components.
The problem with writing good emails is combining the static parts and the dynamic parts.
The best part about emails is the HTML. Stop getting rid of it, and start building on it.
import React from "react";
import { render, useData } from "html-email-for-react";
const html = `
<html>
<body>
<my-component></my-component>
</body>
</html>
`;
function MyComponent() {
const { name } = useData();
return <div>Hello {name}</div>;
}
// NOTE: Html components are CASE-InSeNsItIvE and React names are case sensitive
// So use lowercase component names (see customElements.define)
const components = {
"my-component": MyComponent,
};
const data = {
name: "Jorghan",
};
console.log(render(html, { components, data }));
/*
Returns:
<html>
<body>
<div>Hello Jorghan</div>
</body>
</html>
*/
The great part of this is that it brings the portable web-component method of building components and allows you to build dynamic components using React.
Inspired by StencilJS. I'd love to use Stencil components in emails directly, but email HTML is fickle and doesn't support custom web components.
MJML is a a great language, but it does too much and too little.
Too Much:
Too little:
Benefits of React HTML for Email
FAQs
An HTML processor that makes it easy to enrich HTML templates with rich React components
We found that html-email-for-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 open source maintainers 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
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.