sunmao-ui/packages
Yanzhen Yu ef2669992f perf(runtime): implement slot receiver to avoid of re-render when passing fallback elements
The slot receiver is a magic hole of sunmao's runtime.
In sunmao, we support pass props and fallback elements to a slot.
But if we pass them as React component's props,
it will cause re-render since most of them could not use a shallow equal checker.

Also, in sunmao's runtime, we are not using a traditional React render mechanism.
Instead, we keep most of the components not be rendered and only subscribe to related state updates.

To continue with our design,
we need a way to render slot's fallback elements without passing the elements as props.
This is where the slot receiver comes.
It contains a map and an event emitter, when a slot need render,
it will attach the fallback elements to the map and send a signal via the emitter.
When the Receiver component receive a signal, it will force render the fallback elements.

related: #388
2022-08-23 10:28:06 +08:00
..
arco-lib fix: fix the exampleProperties type errors 2022-08-16 11:52:16 +08:00
chakra-ui-lib perf(runtime): refactor the slot's props and fallback implementation 2022-08-23 10:26:18 +08:00
core Merge pull request #568 from smartxworks/fix/windlike-dev 2022-08-16 15:39:06 +08:00
editor fix: fix selecting component would change the properties' values issue 2022-08-17 10:09:24 +08:00
editor-sdk fix(SpaceWidget): fix padding display misalignment 2022-08-17 17:50:40 +08:00
runtime perf(runtime): implement slot receiver to avoid of re-render when passing fallback elements 2022-08-23 10:28:06 +08:00
shared Merge pull request #568 from smartxworks/fix/windlike-dev 2022-08-16 15:39:06 +08:00
vite-plugin-fs
vite-plugins