swagger-ui icon indicating copy to clipboard operation
swagger-ui copied to clipboard

React 18 support

Open jabacrack opened this issue 3 years ago • 1 comments

Some packages in my application require React 18, but I cannot use it , because react-debounce-input from swagger-ui dependecies support only v17

Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"18.2.0" from the root project
npm ERR!   peer react@"^16.3.0 || ^17.0.0 || ^18.0.0" from [email protected]
npm ERR!   node_modules/ag-grid-react
npm ERR!     ag-grid-react@"28.0.0" from the root project
npm ERR!   18 more (highcharts-react-official, rc-align, rc-motion, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^15.3.0 || ^16.0.0 || ^17.0.0" from [email protected]
npm ERR! node_modules/react-debounce-input
npm ERR!   react-debounce-input@"=3.2.4" from [email protected]
npm ERR!   node_modules/swagger-ui-react
npm ERR!     swagger-ui-react@"4.13.0" from the root project

Do you plan support React 18 in near future (and when) or workaround exist for this problem?

jabacrack avatar Jul 26 '22 14:07 jabacrack

After updating react-debounce-input to version 3.3.0 in release 4.13.2 Swagger work fine with React 18.2.0

jabacrack avatar Aug 10 '22 09:08 jabacrack

@jabacrack does this require any action? If not, mind closing the issue? I'm down to attempt to resolve it if this does require action.

jenniferabowd avatar Oct 02 '22 19:10 jenniferabowd

@jenniferabowd upgrading these 3 libraries will help your downstream dependants to avoid having to include these overrides in their package.json, I opened a PR over here #8244

  "overrides": {
    "swagger-ui-react": {
      "react-inspector": "6.0.1",
      "react-copy-to-clipboard": "5.1.0"
    }
  },

jackkav avatar Oct 21 '22 15:10 jackkav

I am also blocked because of the version of React, does any one know what we have to do to support React 18? I can make a PR for that if someone guides me a little bit 😊✨

hadrien-toma avatar Jan 06 '23 09:01 hadrien-toma

🙏

sybernatus avatar Feb 23 '23 09:02 sybernatus

Addressed by https://github.com/swagger-api/swagger-ui/pull/9435

char0n avatar Dec 20 '23 15:12 char0n