I have some warnings:
Warning: Legacy context API has been detected within a strict-mode tree.
The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
Please update the following components: Transition
and
Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Transition which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely in ...
which I didn't have like a month ago.
<Modal
style={{position: "relative",
top: "50%",
transform: "translateY(-50%)"}}
className="fadein-elements"
isOpen={modal}
toggle={toggle}
>
<ModalHeader toggle={toggle}>Add Post</ModalHeader>
<ModalBody>
<Form onSubmit={onSubmit}>
<FormGroup>
<Label for="subject">Subject</Label>
<Input
type="text"
name="subject"
id="subject"
placeholder="Add Subject..."
onChange={onChange}
/>
<Label for="content">Content</Label>
<Input
type="textarea"
name="content"
id="content"
placeholder="Add content..."
onChange={onChange}
/>
<Button
color="dark"
style={{ marginTop: '2rem' }}
block>
Add Post
</Button>
</FormGroup>
</Form>
</ModalBody>
</Modal>
App works fine, but I always want to clear all warnings in correct way. I assume that I have to add transition Component from react-transition-group, however I prefer to do all my transitions and animations in CSS(which for me works much better with react-waypoint). My React version is 16.13.1
Well finally, I have two questions.
1) What is the purpose of this warning, it means why it is deprecated?
2) Where should I insert this react-group-transition Transition or how should I change this Modal to clear the errors?