Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double import in .js for custom react code. #4375

Closed
Ernelene opened this issue Nov 13, 2024 · 3 comments · Fixed by #4386
Closed

Double import in .js for custom react code. #4375

Ernelene opened this issue Nov 13, 2024 · 3 comments · Fixed by #4386
Labels
bug Something isn't working

Comments

@Ernelene
Copy link

Ernelene commented Nov 13, 2024

With version 0.6.4 and onwards I am getting a duplicate import error in the javascript code for custom react components.

image

In version 0.6.3.post1 it only defines it as a const and does not "import" it as well.

To Reproduce
I added a custom react component like this:
`import reflex as rx
class E3DBar(rx.NoSSRComponent):
library = "/public/echarts3DBar"
tag = "ECharts3DBarReact"
is_default = True
plot_options: rx.Var[str] = ""
plot_type : rx.Var[str] = ""

e3DBar_comp = E3DBar.create`

The error apears when the page loads on which the component is used.

@Ernelene Ernelene added the bug Something isn't working label Nov 13, 2024
Copy link

linear bot commented Nov 13, 2024

@Ernelene
Copy link
Author

Ernelene commented Nov 26, 2024

@Lendemor thanks for fixing this, when will this be released?

@masenf
Copy link
Collaborator

masenf commented Nov 26, 2024

@Ernelene was supposed to be yesterday, hopefully now today. If you want to try out the pre-release with this fix, you can install reflex==0.6.6a2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants