Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Components, as the name suggests, are a way to express parts of Heroic in a modular, interconnected manner. Components are incentivized to be as small as possible; ideally one component does one task.
In the logger example, you can see that there's one component creating the log file, another clearing it, and a 3rd finally writing to it. If we ever want to modify any part of this process (say we want to add a header to any log files), we just have to change the one component, and everything else automatically adapts & is non-the-wiser about the change.
This interconnectedness is achieved by a messaging system, similar to perhaps Electron's IPC or our
backendEvents
. For further details on it, see the comment inbackend/components/registry/types.ts
.Components can both define their own messages as well as calling the ones defined by other components.
For an example on what components might look like, as mentioned, see the logger example.
Note: As-is right now, you'll see some warnings in your IDE around the non-exclusive producers. Those are simply caused by not having any producers in the system yet and can be ignored.
TODO (rough):
Use the following Checklist if you have changed something on the Backend or Frontend: