To avoid issues with re-calculating immediately on change while keeping reactive values in-sync, use reactive accessors to implement pull-based computed values. Propose using computed
for pull-based computed values that are kept synchronized and reactive
to run functionality on initialize and before beforeUpdate
.
Option 2 uses a single reactive:
label and can re-run blocks as-needed based on when reactive values are accessed. I think there are a few downsides to this (side effects could happen at strange times), but it's a bit simpler since it presents a single reactive API.
// Initialized with <Component a=15 />