# uland-ssr

> Same uland API for SSR / DOM-less environments

Latest version **0.5.0** (published 2021-06-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install uland-ssr
pnpm add uland-ssr
yarn add uland-ssr
bun add uland-ssr
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.0 |
| Published | 2021-06-26 |
| First published | 2020-12-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 9.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Andrea Giammarchi |
| Maintainers | webreflection |
| Keywords | uland, ssr, hooks |

## Links

- npm: https://www.npmjs.com/package/uland-ssr
- Repository: https://github.com/WebReflection/uland-ssr
- Homepage: https://github.com/WebReflection/uland-ssr#readme
- Issues: https://github.com/WebReflection/uland-ssr/issues
- npm.io page: https://npm.io/package/uland-ssr

## Dependencies (3)

- [uarray](https://npm.io/package/uarray.md) ^1.0.0
- [uhtml-ssr](https://npm.io/package/uhtml-ssr.md) ^0.5.0
- [uhooks-nofx](https://npm.io/package/uhooks-nofx.md) ^0.2.0

## Recent versions

- 0.5.0 (latest) — 2021-06-26
- 0.4.0 — 2021-03-05
- 0.3.1 — 2021-02-27
- 0.3.0 — 2021-02-12
- 0.2.2 — 2021-01-01
- 0.2.1 — 2020-12-30
- 0.2.0 — 2020-12-29
- 0.1.3 — 2020-12-25
- 0.1.2 — 2020-12-24
- 0.1.1 — 2020-12-24
- 0.1.0 — 2020-12-24
- 0.0.0 — 2020-12-23

## README

# 🦄 <em>µ</em>land-ssr

![tiny island](https://raw.githubusercontent.com/WebReflection/uland/master/uland-head.jpg)

<sup>**Social Media Photo by [Ben Klea](https://unsplash.com/@benkleaphoto) on [Unsplash](https://unsplash.com/)**</sup>

*micro* land SSR, is [µland](https://github.com/WebReflection/uland#readme) API for SSR / DOM-less environments.

It allows using same components code on the client and the server, producing *html* or *svg* streams.

This module also exports `uland-ssr/async`, which is based on `uland-nofx/async`.


### 📣 Community Announcement

Please ask questions in the [dedicated forum](https://webreflection.boards.net/) to help the community around this project grow ♥

---

## API

```js
import {Component, render, html, useState} from 'uland-ssr';

const Counter = Component((initialState) => {
  const [count, setCount] = useState(initialState);
  return html`
  <button onclick=${() => setCount(count + 1)}>
    Count: ${count}
  </button>`;
});

// basic example, creates the expected output
// minus online events (would need re-hydration)
render(String, () => html`
  <div>
    A bounce of counters.<hr>
    ${Counter(0)} ${Counter(1)}
  </div>
`);
```

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