This repository was archived by the owner on Aug 27, 2026. It is now read-only.
Repository navigation
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Based on #35 we can use the integration API via ::create to handle component proxies (or builders actually?), that gather additional information before calling expensive methods like image URI rendering.
Given Kaleidoscope defines the
ImageTagcomponent from before, it can now create a component proxy as follows:Note that it does not implement the component interface, it must not be rendered directly! We could implement a render() method though that throws a meaningful exception that the proxy must be resolved before rendering.
Additionally, to make things less easy, we add an intermediary Figure component as follows:
which transpiles to
We now adjust our card component as follows:
which now transpiles to
In the PHP integration we can now call
This way we can instantiate a component
WDYT?
All reactions