-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add allow wrapping the return result in Identity.
Why: Often two very similar types exist in the application. 1) The type returned from the server. 2) The type used by a component. Frequently enough the only difference between the two is that some fields are wrapped in a functor. So if we allow wrapping the results in Identity, we will be able to share the type definition. E.g. type Data f = { id: ID, name: f String } type Return = Data Identity type State = Data (Either Union) Thus Identity fulfills a similar role to ErrorBoundary, but is a newtype.
- Loading branch information
1 parent
a5531b0
commit 4d58b7e
Showing
4 changed files
with
27 additions
and
3 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