Fork me on GitHub
#announcements
<
2024-06-11
>
vlaaad19:06:36

I released #CGHHJNENB 1.9.0 🎉 — this new version includes improvements that bring cljfx further away from re-frame and closer to react. As per https://github.com/cljfx/cljfx/blob/master/CHANGELOG.md#190---2024-06-11: • event handling became more efficient, where changing handler function from one to another does not touch the JavaFX DOM, which makes event maps unnecessary. • added fx/ext-watcher lifecycle that makes existing renderer concept unnecessary • added fx/ext-state that adds support for local mutable state. I know I know, local state is bad, but for UI in many cases having a small local mutable state is better than integrating it into one big application state. It makes it easier to reason about. • added fx/ext-effect . While fx/ext-state is similar to react's useState hook, fx/ext-effect is similar to useEffect hook. • finally, added fx/ext-recreate-on-key-changed , to provide a way to reset components (similar to react's key). Additionally, I created some examples showcasing the additions: • https://github.com/cljfx/cljfx/blob/master/examples/e42_local_state.cljhttps://github.com/cljfx/cljfx/blob/master/examples/e44_nested_form_view.cljhttps://github.com/cljfx/cljfx/blob/master/examples/e45_git_ui.clj

🎉 22
Luke Johnson03:06:20

Nice work! But fx/ext-effect is really challenging to say out loud! 😜

vlaaad05:06:03

Oops, I haven't tried pronouncing it before 😅