# react-wasm-dom0

> ReactDOM implemented in Rust, compiled to WebAssembly.

Latest version **0.1.0** (published 2019-11-29) · Apache-2.0/MIT license · 0 weekly downloads

## Install

```sh
npm install react-wasm-dom0
pnpm add react-wasm-dom0
yarn add react-wasm-dom0
bun add react-wasm-dom0
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2019-11-29 |
| First published | 2019-11-29 |
| Weekly downloads | 0 |
| License | Apache-2.0/MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 252.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | tarnadas |

## Links

- npm: https://www.npmjs.com/package/react-wasm-dom0
- Repository: https://git.maibornwolff.de/MarioR/react-wasm
- npm.io page: https://npm.io/package/react-wasm-dom0

## Recent versions

- 0.1.0 (latest) — 2019-11-29

## README

# 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](./examples/ssr).

## Installation

`npm install react-wasm-dom`

## Usage

Just replace `renderToString` from ReactDOM with the equivalent provided function.

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

// ....

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

becomes

```tsx
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

---
_Source: https://npm.io/package/react-wasm-dom0 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
