Skip to content

Commit

Permalink
docs(hiccup-svg): resolve #19, update readme, add invocation notes
Browse files Browse the repository at this point in the history
BREAKING CHANGE: technically identical to previous version, however
due to breaking changes and new context support in @thi.ng/hiccup,
SVG functions MUST be invoked directly now and do not support lazy
evaluation anymore. see notice in readme.
  • Loading branch information
postspectacular committed May 13, 2018
1 parent 373701b commit dc77540
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/hiccup-svg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@ This package's functionality was formerly part of
[@thi.ng/hdom-components](https://github.com/thi-ng/umbrella/tree/master/packages/hdom),
but has been extracted to remain more focused.

### Important

The functions provided here do produce valid hiccup elements, but
since none of them make use of (or support) the global hiccup / hdom
context object, they can ONLY be invoked directly, i.e. they MUST be
called like:

```ts
// correct (direct invocation)
svg.svg(svg.circle([0, 0], 100, { fill: "red" }));

// incorrect / unsupported (lazy evaluation)
[svg.svg, [svg.circle, [0, 0], 100, { fill: "red" }]]
```

## Installation

```
Expand Down

0 comments on commit dc77540

Please sign in to comment.