Skip to content

Commit

Permalink
prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Apr 5, 2020
1 parent 319321c commit 6e67ac8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ Initially this will be `title` and `meta`.
- [x] Preact support
- [x] Support `<link>`
- [x] Stricter typings
- [ ] SSR support
- [x] Document the hooks
- [x] Document the dispatcher
- [ ] Document the hooks
- [ ] SSR support
- [ ] Golf bytes

## Preact
Expand All @@ -37,9 +37,23 @@ given string changes it will update the property.

### useMeta

This hook accepts the regular `<meta>` properties, being `name`, `property`, `httpEquiv`,
`charset` and `content`.

These have to be passed as an object and will update when `content` changes.

### useLink

This hook accepts the regular `<link>` properties, being `rel`, `as`, `media`,
`href`, `sizes` and `crossorigin`.

This will update within the same `useLink` but will never go outside

### useLang

This hook accepts a string that will be used to set the `lang` property on the
base `<html>` tag. Every time this string gets updated this will be reflected in the dom.

## Dispatcher

It can be interesting to give this a read, in the code itself.
3 changes: 2 additions & 1 deletion src/dispatcher/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ const changeOrCreateMetaTag = (meta: MetaPayload) => {
* <Child /> --> useTitle('y')
*
* Will display 'x' due to the effects resolving bottom-up, instead we schedule
* both meta and titles in batches.
* both meta and titles in batches. This way we can display 'y' and keep 'x' around
* as a fallback if <Child /> would unmount it will update to 'x'.
*
* When this batch is processed we only take one of each kind of meta and one title.
*
Expand Down

0 comments on commit 6e67ac8

Please sign in to comment.