-
Notifications
You must be signed in to change notification settings - Fork 968
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
Can't create instance of ComponentState
inside foreach
#3238
Labels
bug
Something isn't working
Comments
We should probably throw an error during compilation, because I don't think the current implementation is supposed to work within |
Yea, I think that probably is a good solution, at least in the short term. I'm not sure if the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Attempting to call the
create
method on aComponentState
inside of aforeach
call results in aReferenceError
on the frontend (only if the ComponentState has any reference tocls
in the returned component).To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expect 3 separate components to be created without error.
Screenshots
If applicable, add screenshots to help explain your problem.
Specifics (please complete the following information):
I think I will fall back to using a state that stores a list of an
rx.Base
subclass that holds the state for each item and just include the index in any calls back to event handlers so that I can update the appropriate item.The text was updated successfully, but these errors were encountered: