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.
A previous refactoring removed the ability to do
init: pojo
inthe API, and instead consolidated usage on
init: { input: pojo }
.This was good, but a surprising artifact of
init: pojo
was that it did not re-init as the identity of pojo changes (vs. theinit.input = pojo
whcih does re-init as the identity changes).This dictomoy between "one re-inits and one does not" was fairly aribtrary and was a big reason behind removing the "two ways of doing things".
That said, in rolling out the change to internal-frontend, a number of callers were enjoying the implicit useMemo-ification of their
init: pojo
, and so this PR adds aninit.onlyOnce
flag that basically restores the "don't watch the init.input identity" behavior.