Skip to content

Commit

Permalink
Add notes
Browse files Browse the repository at this point in the history
  • Loading branch information
dy committed Oct 22, 2024
1 parent d9c00e5 commit fb86d97
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,8 @@ sprae.use({ compile })
* `event` is not used, `:on*` attributes expect a function with event object as first argument `:onevt="event => handle()"`, see [#46](https://github.com/dy/sprae/issues/46).
* `key` is not used, `:each` uses direct list mapping instead of dom diffing.
* `await` is not supported in attributes, it’s a strong indicator you need to put these methods into state.
* `:ref` can be used as mount/unmount - returned function is called on dispose `:ref=el=>(init, ()=> dispose)`
* To set innerHTML or instantiate a template do it manually `:ref="el=>el.innerHTML=..."`, `:ref="el=>el.replaceChildren(sprae(tpl.content))"`

## Justification

Expand Down
2 changes: 2 additions & 0 deletions todo.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@
* [x] fix wavearea
* [x] fix :if within :each
* [x] make functional ref
* [x] add hint about :html
* [x] make v11 release

## Backlog

Expand Down

0 comments on commit fb86d97

Please sign in to comment.