Skip to content

Architecture question #4

@jessetane

Description

@jessetane

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions