Created
March 30, 2018 15:43
-
-
Save erikras/a944557d23e4d73d9d79c227ca1b08bf to your computer and use it in GitHub Desktop.
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
<MakeAsyncFunction | |
listener={promiseListener} | |
start="START_ACTION_TYPE" // the type of action to dispatch when this function is called | |
resolve="RESOLVE_ACTION_TYPE" // the type of action that will resolve the promise | |
reject="REJECT_ACTION_TYPE" // the type of action that will reject the promise | |
>{asyncFunc => ( | |
<SomeFormLibrary onSubmit={asyncFunc}> | |
... | |
<button type="submit">Submit</button> | |
</SomeFormLibrary> | |
)}</MakeAsyncFunction> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment