What libraries does Reacton support
When Reacton is imported, we add the .element(...)
method to the base ipywidget.Widget
base class. This allows us to create a Reacton element for all existing widgets. For example:
However, because we care about type safety, we generate wrapper components for some libraries. This enables type completion in VSCode, type checks with VSCode, and mypy.
The following libraries are fully wrapped:
This allows us to do instead:
And enjoy auto complete and type checking.
Create your own wrapper
The best example would be to take a look at the source code for now:
The code is generated by executing:
$ python -m reacton.ipywidgets
Reacton assumes the widget constructor arguments match the traits. If this is not the case, this may result in runtime errors. If this leads to issues, please open an Issue to discuss this.