-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Require init.input or init.query. (#104)
We've had several auto-saving form-states not realize they should use init.input + map to get the latest data from the mutation response automatically included in the form. In general, having `init: T` is a legacy/rare use case, so let's try removing it. Callers that were doing `init: data` can now do `init { input: data }` although technically the `init.input` will pull in changes to `data` as its identity changes, while `init: data` would not. If we roll this out and find a lot of places that need that `init: data` behavior, we could add something like: ``` init: { input: data, initOnlyOnce: true, } ``` Or something like that, to be more explicit that they're requesting to not re-read the `input: data` value on each re-render.
- Loading branch information
Showing
5 changed files
with
51 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters