Reactjs 我试图在Formik中使用material ui Select,但在StrictMode中不推荐使用findDOMNode警告

Reactjs 我试图在Formik中使用material ui Select,但在StrictMode中不推荐使用findDOMNode警告,reactjs,material-ui,formik,Reactjs,Material Ui,Formik,有没有办法在Formik中使用Material UI select而不获取此findDOMNode警告消息? 我有一个简单的应用程序。我没有发布全部代码,只是发布了我面临这个问题的部分。 Formik版本是:2.1.5。 请检查此处的警告消息: 导入{ 网格, 排版, TextField, FormControl, 输入标签, MenuItem, 选择, FormHelperText, }来自“@材料界面/核心”; 从“Formik”导入{Formik,Field,Form,ErrorMessa

有没有办法在Formik中使用Material UI select而不获取此findDOMNode警告消息? 我有一个简单的应用程序。我没有发布全部代码,只是发布了我面临这个问题的部分。 Formik版本是:2.1.5。 请检查此处的警告消息:

导入{
网格,
排版,
TextField,
FormControl,
输入标签,
MenuItem,
选择,
FormHelperText,
}来自“@材料界面/核心”;
从“Formik”导入{Formik,Field,Form,ErrorMessage};
常量数据={hours:''}
TC1配置
小时
01
02
import {
  Grid,
  Typography,
  TextField,
  FormControl,
  InputLabel,
  MenuItem,
  Select,
  FormHelperText,
} from "@material-ui/core";
 import { Formik, Field, Form, ErrorMessage } from "formik";

const data = {hours : ''}
     
<Formik
 initialValues={data}
 >
    <Form>
     <Grid item xs={12} md={12}>
         <Typography variant="subtitle2">TC1 CONFIGURATION</Typography>
      </Grid>
      <Grid item xs={12} md={12}>
        <Grid container spacing={2}>
          <Grid item>
            <FormControl>
              <InputLabel id="demo-simple-select-label">
                Hours
              </InputLabel>
              <Field
                name="hours"
                type="select"
                as={Select}
              >
                <MenuItem value={60}>01</MenuItem>
                <MenuItem value={120}>02</MenuItem>
              </Field>
            </FormControl>
          </Grid>
        </Grid>
      </Grid>
    </Form>
<Formik/>