Help WIth Obscure Javascript (Event Emitters & Computed Variables)
Go to solution
Solved by TheNuzziNuzz,
The solution was to use Proxies on all the objects call by my "computed" functions. Initially set the computed function to a global variable, execute the function, and within the "get" proxy save a copy of function via the global variable so whenever "set" is called so is the original computed function. This way any variables used in the computed function will cause the computed function to re-run.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now