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

Architecture question #4

Open
jessetane opened this issue Dec 15, 2015 · 2 comments
Open

Architecture question #4

jessetane opened this issue Dec 15, 2015 · 2 comments

Comments

@jessetane
Copy link
Owner

I added a component to show the current block, and allow jumping directly to other blocks. Typically keeping components cleanly separated is easy enough as they only need information from the url to get themselves into the proper state. However this is not the case with the block selector, which is driven by and directly affects only the chart component (irrespective of the url). I like being able to declaratively specify where the component is located in the DOM with HTML, but feel a bit funny about how tightly coupled it is with the chart. I decided that I was overthinking things (there is only ever one instance of each component in this app) and used document.querySelector to grab a module scoped reference to the chart, but I'd be interested to hear other ideas for dealing with component inter-dependencies like this!

@jessetane
Copy link
Owner Author

@jessetane
Copy link
Owner Author

Maybe use window.dispatchEvent?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant