1
0
Fork 0

chore: Updating hooks docs for v3

This commit is contained in:
Joost De Cock 2022-09-29 23:43:00 +02:00
parent 098d23c3b7
commit 2c12227ea8
14 changed files with 288 additions and 47 deletions

View file

@ -2,8 +2,19 @@
title: preRender
---
The `preRender` hook is triggered just before your pattern is rendered to SVG.
The `preRender` lifecycle hook is triggered just before your pattern is
rendered to SVG.
Your hook method will receive [the SVG object](/api/svg) as its first parameter.
## Signature
It is typically used to change the result of the render, for example by adding CSS to the SVG output.
```js
null hook(Svg svg)
```
## Notes
The `preRender` hook is typically used to change the result of the render, for
example by adding CSS to the SVG output.
Like the `postRender` hook, it receives [the SVG object](/api/svg) as its first
parameter.