payload: {"action":"created","issue":{"url":"https://api.github.com/repos/dozoisch/react-google-recaptcha/issues/147","repository_url":"https://api.github.com/repos/dozoisch/react-google-recaptcha","labels_url":"https://api.github.com/repos/dozoisch/react-google-recaptcha/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/dozoisch/react-google-recaptcha/issues/147/comments","events_url":"https://api.github.com/repos/dozoisch/react-google-recaptcha/issues/147/events","html_url":"https://github.com/dozoisch/react-google-recaptcha/issues/147","id":479222893,"node_id":"MDU6SXNzdWU0NzkyMjI4OTM=","number":147,"title":"issue while resetting the recaptcha","user":{"login":"krnbr","id":5213380,"node_id":"MDQ6VXNlcjUyMTMzODA=","avatar_url":"https://avatars0.githubusercontent.com/u/5213380?v=4","gravatar_id":"","url":"https://api.github.com/users/krnbr","html_url":"https://github.com/krnbr","followers_url":"https://api.github.com/users/krnbr/followers","following_url":"https://api.github.com/users/krnbr/following{/other_user}","gists_url":"https://api.github.com/users/krnbr/gists{/gist_id}","starred_url":"https://api.github.com/users/krnbr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krnbr/subscriptions","organizations_url":"https://api.github.com/users/krnbr/orgs","repos_url":"https://api.github.com/users/krnbr/repos","events_url":"https://api.github.com/users/krnbr/events{/privacy}","received_events_url":"https://api.github.com/users/krnbr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-08-10T03:29:34Z","updated_at":"2019-08-10T03:38:13Z","closed_at":"2019-08-10T03:38:13Z","author_association":"NONE","body":"react-google-recaptcha version: 2.0.0-rc.1\r\nreact-async-script version: 1.1.1\r\n\r\nI am having an issue while resetting the recaptcha\r\n\r\nI am using a functional component\r\n\r\nextracts of code as below\r\n\r\n```\r\n// imports etc.. here\r\nconst Login: NextPage = (props:any) => {\r\n\r\n// othere initializations here...\r\n\r\nconst recaptchaInputRef:any = React.createRef();\r\n\r\nconst handleSubmit = async (event) => {\r\n\r\n      // some if condition\r\n     // and else\r\n     // and inside there\r\n     recaptchaInputRef.current.reset();\r\n\r\n}\r\n\r\nreturn (\r\n        <React.Fragment>\r\n\r\n               <form onSubmit={e => handleSubmit(e)}>\r\n\r\n               // other components and elements\r\n\r\n              <ReCAPTCHA\r\n                 ref={recaptchaInputRef}\r\n                 sitekey={props.recaptchaKey}\r\n                 onChange={ onChange }\r\n                 onExpired={ onExpired }\r\n                 />\r\n\r\n              <Button type=\"submit\">Sign In</Button>\r\n              </form>\r\n        </React.Fragment>\r\n);\r\n\r\n```\r\n\r\nnow the issue is that i get - Cannot read property 'reset' of null for the code -> `recaptchaInputRef.current.reset();`"},"comment":{"url":"https://api.github.com/repos/dozoisch/react-google-recaptcha/issues/comments/520114473","html_url":"https://github.com/dozoisch/react-google-recaptcha/issues/147#issuecomment-520114473","issue_url":"https://api.github.com/repos/dozoisch/react-google-recaptcha/issues/147","id":520114473,"node_id":"MDEyOklzc3VlQ29tbWVudDUyMDExNDQ3Mw==","user":{"login":"krnbr","id":5213380,"node_id":"MDQ6VXNlcjUyMTMzODA=","avatar_url":"https://avatars0.githubusercontent.com/u/5213380?v=4","gravatar_id":"","url":"https://api.github.com/users/krnbr","html_url":"https://github.com/krnbr","followers_url":"https://api.github.com/users/krnbr/followers","following_url":"https://api.github.com/users/krnbr/following{/other_user}","gists_url":"https://api.github.com/users/krnbr/gists{/gist_id}","starred_url":"https://api.github.com/users/krnbr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krnbr/subscriptions","organizations_url":"https://api.github.com/users/krnbr/orgs","repos_url":"https://api.github.com/users/krnbr/repos","events_url":"https://api.github.com/users/krnbr/events{/privacy}","received_events_url":"https://api.github.com/users/krnbr/received_events","type":"User","site_admin":false},"created_at":"2019-08-10T03:38:13Z","updated_at":"2019-08-10T03:38:13Z","author_association":"NONE","body":"ok good news, I was able to resolve it using reacts hooks kind of reference initialization as below\r\n\r\n```\r\nconst recaptchaInputRef:any = useRef({});\r\n```\r\n\r\nand it worked awesomely"}}
other: {"actor":{"display_login":"krnbr"}}