Convert modal to jsx#3649
Conversation
| import _Transition from "react-transition-group/Transition"; | ||
| const Transition = createFactory(_Transition); | ||
|
|
||
| import Transition from "react-transition-group/Transition"; |
There was a problem hiding this comment.
I am really unsure.
Transition is used within Slide. Which is the default export.
I did a quick search but couldn't find any usage of Slide, but bc I am a total noob on your codebase this doesnot mean I didn't oversee something
There was a problem hiding this comment.
Slide is a component. You can convert the default export to JSX and make this proper change.
There was a problem hiding this comment.
Something like this:
export default function Slide({
in: inProp,
children,
handleClose
}: SlideProps) {
return (
<Transition id={inProp} timeout={175} appear>
{status => <Modal status={status} handleClose={handleClose}>{children}</Modal>}
</Transition>
);
}|
I could comment out the Slide function and See if it breaks the bundle. But this would only work if you do not dynamics require()... |
wldcordeiro
left a comment
There was a problem hiding this comment.
See comments about JSX for Slide.
Codecov Report
@@ Coverage Diff @@
## master #3649 +/- ##
==========================================
- Coverage 54.51% 54.49% -0.02%
==========================================
Files 120 120
Lines 4786 4784 -2
Branches 992 992
==========================================
- Hits 2609 2607 -2
Misses 2177 2177
Continue to review full report at Codecov.
|
|
@wldcordeiro @jasonLaster Updated based on your suggestions. |
Associated Issue: #3506
Summary of Changes
Changed Modal to JSX syntax
I am quite unsure about the "Slide"-component...