Browse Source

mention preact under `UI plugins`

Renée Kooi 7 years ago
parent
commit
be069696cb
1 changed files with 6 additions and 4 deletions
  1. 6 4
      website/src/docs/how-to-plugin.md

+ 6 - 4
website/src/docs/how-to-plugin.md

@@ -153,15 +153,17 @@ When `mode` is `'determinate'`, also add the `value` property:
 
 ## UI Plugins
 
-UI Plugins can be used to show a user interface.
+UI Plugins can be used to show a user interface. Uppy plugins use [preact](https://preactjs.com) for rendering. preact is a very small React-like library that works really well with Uppy's state architecture. Uppy implements preact rendering in the `mount(target)` and `update()` plugin methods, so if you want to write a custom UI plugin using some other library, you can override those methods.
+
+Plugins can implement certain methods to do so, that will be called by Uppy when necessary:
 
 ### `mount(target)`
 
-> UI plugins only.
+Mount this plugin to the `target` element. `target` can be a CSS query selector, a DOM element, or another Plugin. If `target` is a Plugin, the source (current) plugin will register with the target plugin, and the latter can decide how and where to render the source plugin.
 
-### `render()`
+This method can be overridden to support for different render engines.
 
-> UI plugins only.
+### `render()`
 
 Render this plugin's UI. Uppy uses [preact](https://preactjs.com) as its view engine, so `render()` should return a preact element.
 `render` is automatically called by Uppy on each state change.