Socket
Socket
Sign inDemoInstall

react-wasm-dom0

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-wasm-dom0

ReactDOM implemented in Rust, compiled to WebAssembly.


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
253 kB
Created
Weekly downloads
 

Readme

Source

ReactWasmDOM

An experimental drop-in replacement for ReactDOM, written in Rust, compiled to WebAssembly.

Status

There are currently only plans to support renderToString, which is already half-functional. HTML markup should be generated (correctly), but no attributes will be rendered.

You can see a working SSR example right here.

Installation

npm install react-wasm-dom

Usage

Just replace renderToString from ReactDOM with the equivalent provided function.

import { renderToString } from "react-dom/server";

// ....

const markup = renderToString(<App />);

becomes

import("react-wasm-dom/server").then(({ renderToString }) => {
  // ....

  const markup = renderToString(<App />);
});

Caveats

  • Only modern module bundlers are supported. Otherwise the library won't load successfully under Node

Roadmap

  • Unit Tests
  • HTML attribute rendering

FAQs

Last updated on 29 Nov 2019

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc