Skip to content

Commit

Permalink
docs: add big warning about plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshuawuyts committed Jul 21, 2016
1 parent ecd50cd commit cb3e315
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,15 @@ document.body.appendChild(tree)

Generally people using `choo` shouldn't be too worried about the specifics of
`plugins`, as the internal API is (unfortunatly by necessecity) quite complex.
After all they're the most powerful way to modify a `choo` appliction. If you
want to learn more about creating your own `plugins`, and which `hooks` are
available, head on over to [app.use()](#appusehooks).
After all they're the most powerful way to modify a `choo` appliction.

__:warning: Warning :warning:: plugins should only be used as a last resource.
It creates peer dependencies which makes upgrading versions and switching
frameworks a lot harder. Please exhaust all other options before using
plugins.__

If you want to learn more about creating your own `plugins`, and which `hooks`
are available, head on over to [app.use()](#appusehooks).

## Badges
Using `choo` in a project? Show off which version you've used using a badge:
Expand Down Expand Up @@ -483,6 +489,11 @@ There are several `hooks` that are picked up by `choo`:
- __onStateChange(action, state, prev, caller, createSend):__ called after a
reducer changes the `state`.

__:warning: Warning :warning:: plugins should only be used as a last resource.
It creates peer dependencies which makes upgrading versions and switching
frameworks a lot harder. Please exhaust all other options before using
plugins.__

`createSend()` is a special function that allows the creation of a new named
`send()` function. The first argument should be a string which is the name, the
second argument is a boolean `callOnError` which can be set to `true` to call
Expand Down

0 comments on commit cb3e315

Please sign in to comment.