v0.20.0 #623
bitspittle
announced in
Announcements
v0.20.0
#623
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This release is nearly identical to 0.19.3 (with minor changes discussed below) but enables support for Kotlin 2.1.0.
Important
Planning to upgrade? Review instructions in the README.
Changes
Canvas
widgets now detect if their lambda block changes upon subsequent recompositions.Notes
Canvas lambdas
When I first wrote the canvas widget, I basically expected the render callback passed into it itself to never change over time.
For example, refer to this clock rendering demo. Obviously, each time the render call happens, you'll get a new result (as it is based on the current time), but the callback logic itself is unchanging and self contained.
However, if you wrote a lambda that, for example, captured some values, then that lambda will be recreated each time the method is recomposed. Here, this lambda will be regenerated for each time a new cursor position is passed into the parent function:
Previously, the
Canvas2d
internally remembered the first lambda that was passed in and ignored all subsequent changes.This is not an issue that perhaps 99.9% of Kobweb users would ever run into -- especially given that this bug has been present for almost three years at this point and was just recently reported -- but I didn't know how else to explain this feature without describing it in this much detail!
Thanks
Thanks to @DennisTsar for doing the early legwork on investigating 2.1.0, including a way to get past a roadblock that would have otherwise significantly delayed the release, as well as for identifying the refactoring that would cut our site size down.
Full Changelog: v0.19.3...v0.20.0
This discussion was created from the release v0.20.0.
Beta Was this translation helpful? Give feedback.
All reactions