fabulous-dev / Fabulous

Declarative UI framework for cross-platform mobile & desktop apps, using MVU and F# functional programming
https://fabulous.dev
Apache License 2.0
1.14k stars 121 forks source link

Allow to use one Runner for multiple components #856

Open Dolfik1 opened 3 years ago

Dolfik1 commented 3 years ago

Use case

This proposal is intended to improve performance and optimize memory usage. This can be useful when we have multiple instances of same component.

image

As you can see on the screen there are 3 avatars of same person. There is no need to keep 3 active runners for each avatar. Instead of this Fabulous can use the same runner for each instance of component (avatar).

Proposal

Fabulous can detect the same components by their key. This behavior should be disabled by default, but we can enable it with a special property (reuseRunner).