{"action":"created","issue":{"url":"https://api.github.com/repos/jaredpalmer/formik/issues/529","repository_url":"https://api.github.com/repos/jaredpalmer/formik","labels_url":"https://api.github.com/repos/jaredpalmer/formik/issues/529/labels{/name}","comments_url":"https://api.github.com/repos/jaredpalmer/formik/issues/529/comments","events_url":"https://api.github.com/repos/jaredpalmer/formik/issues/529/events","html_url":"https://github.com/jaredpalmer/formik/issues/529","id":307162174,"node_id":"MDU6SXNzdWUzMDcxNjIxNzQ=","number":529,"title":"setFieldValue should return a Promise or receive a callback","user":{"login":"today-","id":745745,"node_id":"MDQ6VXNlcjc0NTc0NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/745745?v=4","gravatar_id":"","url":"https://api.github.com/users/today-","html_url":"https://github.com/today-","followers_url":"https://api.github.com/users/today-/followers","following_url":"https://api.github.com/users/today-/following{/other_user}","gists_url":"https://api.github.com/users/today-/gists{/gist_id}","starred_url":"https://api.github.com/users/today-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/today-/subscriptions","organizations_url":"https://api.github.com/users/today-/orgs","repos_url":"https://api.github.com/users/today-/repos","events_url":"https://api.github.com/users/today-/events{/privacy}","received_events_url":"https://api.github.com/users/today-/received_events","type":"User","site_admin":false},"labels":[{"id":626821599,"node_id":"MDU6TGFiZWw2MjY4MjE1OTk=","url":"https://api.github.com/repos/jaredpalmer/formik/labels/enhancement","name":"enhancement","color":"0052cc","default":true},{"id":648989527,"node_id":"MDU6TGFiZWw2NDg5ODk1Mjc=","url":"https://api.github.com/repos/jaredpalmer/formik/labels/priority:%20medium","name":"priority: medium","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":{"login":"jaredpalmer","id":4060187,"node_id":"MDQ6VXNlcjQwNjAxODc=","avatar_url":"https://avatars2.githubusercontent.com/u/4060187?v=4","gravatar_id":"","url":"https://api.github.com/users/jaredpalmer","html_url":"https://github.com/jaredpalmer","followers_url":"https://api.github.com/users/jaredpalmer/followers","following_url":"https://api.github.com/users/jaredpalmer/following{/other_user}","gists_url":"https://api.github.com/users/jaredpalmer/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredpalmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredpalmer/subscriptions","organizations_url":"https://api.github.com/users/jaredpalmer/orgs","repos_url":"https://api.github.com/users/jaredpalmer/repos","events_url":"https://api.github.com/users/jaredpalmer/events{/privacy}","received_events_url":"https://api.github.com/users/jaredpalmer/received_events","type":"User","site_admin":false},"assignees":[{"login":"jaredpalmer","id":4060187,"node_id":"MDQ6VXNlcjQwNjAxODc=","avatar_url":"https://avatars2.githubusercontent.com/u/4060187?v=4","gravatar_id":"","url":"https://api.github.com/users/jaredpalmer","html_url":"https://github.com/jaredpalmer","followers_url":"https://api.github.com/users/jaredpalmer/followers","following_url":"https://api.github.com/users/jaredpalmer/following{/other_user}","gists_url":"https://api.github.com/users/jaredpalmer/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredpalmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredpalmer/subscriptions","organizations_url":"https://api.github.com/users/jaredpalmer/orgs","repos_url":"https://api.github.com/users/jaredpalmer/repos","events_url":"https://api.github.com/users/jaredpalmer/events{/privacy}","received_events_url":"https://api.github.com/users/jaredpalmer/received_events","type":"User","site_admin":false}],"milestone":null,"comments":22,"created_at":"2018-03-21T09:00:31Z","updated_at":"2018-07-02T16:58:03Z","closed_at":null,"author_association":"NONE","body":"## Feature\r\n\r\n## Current Behavior\r\nsetFieldValue() is async because it uses setState(), but it doesn't receive a callback or return anything.\r\nThat's why it's hard to get modified values right after that, for example if I want to run submitForm().\r\n\r\n\r\n## Desired Behavior\r\nsetFieldValue() will return a promise, so I could await it and get changed values.\r\n\r\n\r\n## Suggested Solutions\r\nreturn a Promise from setFieldValue() OR add additional callback to function declaration\r\n\r\n\r\n- Formik Version: 0.11.11\r\n- React Version: 16.2.0\r\n- CodeSandbox Link: https://codesandbox.io/s/x9445yl5lp\r\n"},"comment":{"url":"https://api.github.com/repos/jaredpalmer/formik/issues/comments/401868699","html_url":"https://github.com/jaredpalmer/formik/issues/529#issuecomment-401868699","issue_url":"https://api.github.com/repos/jaredpalmer/formik/issues/529","id":401868699,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTg2ODY5OQ==","user":{"login":"timc13","id":74982,"node_id":"MDQ6VXNlcjc0OTgy","avatar_url":"https://avatars3.githubusercontent.com/u/74982?v=4","gravatar_id":"","url":"https://api.github.com/users/timc13","html_url":"https://github.com/timc13","followers_url":"https://api.github.com/users/timc13/followers","following_url":"https://api.github.com/users/timc13/following{/other_user}","gists_url":"https://api.github.com/users/timc13/gists{/gist_id}","starred_url":"https://api.github.com/users/timc13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timc13/subscriptions","organizations_url":"https://api.github.com/users/timc13/orgs","repos_url":"https://api.github.com/users/timc13/repos","events_url":"https://api.github.com/users/timc13/events{/privacy}","received_events_url":"https://api.github.com/users/timc13/received_events","type":"User","site_admin":false},"created_at":"2018-07-02T16:58:03Z","updated_at":"2018-07-02T16:58:03Z","author_association":"CONTRIBUTOR","body":"yes, this would be very useful for `setTouched`, `setError`, etc. as well."}}
{"actor":{"display_login":"timc13"}}