| Q | A
| ------------------------------- | -------
| Bug or feature request? | Feature request
| Which Swagger/OpenAPI version? |
| Which Swagger-UI version? | [email protected]
| How did you install Swagger-UI? | npm
| Which browser & version? | Chrome latest
| Which operating system? | OSX
When upgrading to React 16, Swagger UI should not throw any errors.
It throws an error.
Upgrade react-collapse to use a newer version.
I am embedding Swagger-UI in my React app. I tried to upgrade to React 16 but got some errors. Swagger UI uses an old version of react-collapse that uses an old version of react-motion that is using react.PropTypes, which no longer exist in React.
Yeah, looks like Motion is also reaching into some private React APIs that went away (a complete rewrite would break the private API, imagine that!). Thanks for opening an issue for this.
Moving swagger-ui itself to React 16 is on our radar, but not in anyone's work queue (OAS 3.0 is the core team's focus right now). If you have the time to make a PR for this, we'd appreciate it!
Yea, the later version of Motion are compatible with React 16 and I would assume the same for react-collapse. Swagger-UI is pegged to a version of react-collapse that is a couple of major versions old. I'm guessing the new versions break Swagger-UI in some way?
If find some time I would be happy to make a PR.
@bezreyhan, I'm not sure what exactly has changed in react-collapse between now and then, so I can't definitively say whether it would break Swagger-UI.
If you have the time to, a PR that updates the dependency would be great - just be sure to confirm that the new version works 馃槃 thanks!
Just merged a PR that fixes this issue - sounds like @legrego has Swagger-UI working well in a React 16 project after the changes 馃帀
Most helpful comment
@bezreyhan, I'm not sure what exactly has changed in
react-collapsebetween now and then, so I can't definitively say whether it would break Swagger-UI.If you have the time to, a PR that updates the dependency would be great - just be sure to confirm that the new version works 馃槃 thanks!