[REF-3219] use hooks.useState will raise: ValueError: Can not compile, the tag useState is used multiple time from react and react
Describe the bug
A clear and concise description of what the bug is.
use hooks.useState, will raise: ValueError: Can not compile, the tag useState is used multiple time from react and react
hooks._compose_react_imports function, create ImportVar object with install=False; and in banner.py, ConnectionToaster.add_hooks create ImportVar object with install=True;
these will make compler.validate_imports raise ValueError.
should be a simple enough fix to get rid of the install=False in _compose_react_imports
I think install=Falseis correct though (even if we have a special case that exclude installing react dynamically since it's installed during `init`)
I'd rather set it to False in `ConnectionToaster.add_hooks`
We could also merge that patch that moves the install special cases to ImportVar.__init__ or similar. Then it wouldn't matter how it was specified in different places.
We could also merge that patch that moves the install special cases to
ImportVar.__init__or similar. Then it wouldn't matter how it was specified in different places.
I'd be fine with that, do you have the id of the PR containing that patch if it's waiting/ready for review?