You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can see from the workaround above that it could be possible to allow users to take IpyReact component code and almost copy paste it into a ReactiveHTML component with a utility function like _esm.
One question I have is whether we want to support the component signature
exportdefaultfunction({value, set_value, debug})
or
exportdefaultfunction({data, debug})
And somehow the code needs to add functionality to rerender when data parameter values changes. Should that user specify which parameters trigger a rerender? Or can that be automatically determined?
Another question I have is how to inject Panel components from _scripts instead of via template variables ${...} in the _template. See #5551
The text was updated successfully, but these errors were encountered:
MarcSkovMadsen
changed the title
Add support for esm modules, async/ await, import maps, jsx/ tsx and typescript
Add support for esm modules, async/ await, import maps, jsx/ tsx and typescript to ReactiveHTML
Sep 28, 2023
MarcSkovMadsen
changed the title
Add support for esm modules, async/ await, import maps, jsx/ tsx and typescript to ReactiveHTML
ReactiveHTML: Add support for esm modules, async/ await, import maps, jsx/ tsx and typescript
Sep 28, 2023
I'm working on the
ReactiveHTML
docs. When comparing to AnyWidget and Ipyreact I can see that they support modern browser features likeimport
statementsimport
mapswhile
ReactiveHTML
does not or does not easily.The consequences are
ReactiveHTML
componentAnywidget
orIpyreact
examples or code intoReactiveHTML
Please either add these features to
ReactiveHTML
or document how to add them.Workaround
In the below example I show how to work around some of the missing features. This example is based on the
IpyReact
getting started example.<script type="module"></script>
tagimport
statements:import(...).then
syntax.import
maps: no workaround yet.then
syntaxDiscussion
You can see from the workaround above that it could be possible to allow users to take IpyReact component code and almost copy paste it into a
ReactiveHTML
component with a utility function like_esm
.One question I have is whether we want to support the component signature
or
And somehow the code needs to add functionality to rerender when
data
parameter values changes. Should that user specify which parameters trigger a rerender? Or can that be automatically determined?Another question I have is how to inject Panel components from
_scripts
instead of via template variables${...}
in the_template
. See #5551The text was updated successfully, but these errors were encountered: