Skip to content

1.0.0

Compare
Choose a tag to compare
@easafe easafe released this 04 Apr 15:28
· 80 commits to master since this release

While the user interface remains largely the same, release 1.0.0 is a quasi complete rewrite of the project. Read on:

New virtual DOM

Nearly all changes are powered by a custom renderer implemented in JavaScript. Internally:

  • snabbdom (and snabbdom-to-html) has been dropped, meaning there is no longer any external JavaScript dependencies

  • Virtual nodes have a more lightweight representation so memory usage and overall performance should improve

  • Hydration of server-side rendered applications should improve as the DOM is now untouched expect for event delegation (in case of no diffing issues)

  • Events of the same type create at most a single shared event listener (a.k.a., synthetic events)

Breaking changes

  • Module cleanup

Following PureScript conventions, anything in all caps has been renamed, e.g., Flame.HTML.Element => Flame.Html.Elment, innerHTML => innerHtml, etc. Files that should not be imported by user code now live in Internal modules

  • Classes, similarly to styles, are merged into single declarations

  • It is possible to declare more than one event handler for a single event type

For example div [onClick Message1, onClick Message2] raises in order both messages (the previous behavior was to overwrite)

Other changes

  • Mounting an application no longer destroys the selector

  • Fragments (a la react) have been added

  • Conditionals in views (e.g., case or if else) should work seamlessly

  • innerHtml no longer panics for elements with children

  • There is a clearer distinction now between "keyed" and non-keyed rendering

  • Benchmarks have been added

  • Simplified example folders; docs should be also easier to read now