I tried to use import { Button, Form, Input } from 'formik-semantic-ui';
in component Register
but I get this warning:
Warning: findDOMNode
is deprecated in StrictMode
. findDOMNode
was passed an instance of RefFindNode
which is inside StrictMode
. Instead, add a ref directly to the element you want to reference.
in button (created by Button)
in RefFindNode (created by Ref)
in Ref (created by Button)
in Button
in Unknown (at Register.js:18)
in form (created by Form)
in Form (created by Formik)
in Formik (created by FormikForm)
in FormikForm (at Register.js:12)
in Unknown (at App.js:7)
in div (at App.js:6)
in App (at src/index.js:9)
in StrictMode (at src/index.js:8)
This is the code:
import React, {useState} from 'react'
import { Button, Form, Input } from 'formik-semantic-ui';
import * as Yup from 'yup';
export default ()=>{
const handleSubmit = (values) => {
debugger;
console.log(values);
}
return (
<Form initialValues={{firstName:'',lastName:'', emailAddress:''}} onSubmit = {handleSubmit}>
<Input label="Email" name="emailAddress" />
<Form.Group widths="2">
<Input label="First Name" name="firstName" />
<Input label="Last Name" name="lastName" />
</Form.Group>
<Button.Submit>Submit</Button.Submit>
<Button.Reset>Reset</Button.Reset>
</Form>
)
}