🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

react-markup

Package Overview
Dependencies
Maintainers
1
Versions
355
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-markup

React package generating embedded markup such as e-mails with support for Server Components.

experimental
Source
npmnpm
Version
0.0.0-experimental-fd524fe0-20251121
Version published
Weekly downloads
789
16.03%
Maintainers
1
Weekly downloads
 
Created
Source

react-markup

This package provides the ability to render standalone HTML from Server Components for use in embedded contexts such as e-mails and RSS/Atom feeds. It cannot use Client Components and does not hydrate. It is intended to be paired with the generic React package, which is shipped as react to npm.

Installation

npm install react react-markup

Usage

import { experimental_renderToHTML as renderToHTML } from 'react-markup';
import EmailTemplate from './my-email-template-component.js'

async function action(email, name) {
  "use server";
  // ... in your server, e.g. a Server Action...
  const htmlString = await renderToHTML(<EmailTemplate name={name} />);
  // ... send e-mail using some e-mail provider
  await sendEmail({ to: email, contentType: 'text/html', body: htmlString });
}

Note that this is an async function that needs to be awaited - unlike the legacy renderToString in react-dom.

API

react-markup

See https://react.dev/reference/react-markup

Thanks

The React team thanks Nikolai Mavrenkov for donating the react-markup package name.

Keywords

react

FAQs

Package last updated on 24 Nov 2025

Did you know?

Socket

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.

Install

Related posts