You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
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!The text was updated successfully, but these errors were encountered: