to ===> "react": "^18.2.0", "react-dom": "^16" /> to ===> "react": "^18.2.0", "react-dom": "^16" /> to ===> "react": "^18.2.0", "react-dom": "^16"/>

How to fix error at run time after upgrading react "^16.13.1" to "^18.2.0 " & semantic-ui-react "^0.88.2" to "^2.1.4"

52 Views Asked by At

To upgrading existing react app, where at ui library used semantic-ui-react...

"react": "^16.13.1",            ===> to ===> "react": "^18.2.0",
"react-dom": "^16.13.1",        ===> to ===> "react-dom": "^18.2.0",
"semantic-ui-css": "2.5.0",     ===> to ===> "semantic-ui-css": "^2.5.0",
"semantic-ui-react": "^0.88.2", ===> to ===> "semantic-ui-react": "^2.1.4",

after upgrading, when run the app and go to main dashboard, its work good, but when trying to open side panel by btn click then its generate this error ---

Uncaught Error: Unable to find node on an unmounted component.
    at findHostInstanceWithWarning (react-dom.development.js:24281:1)
    at Object.findDOMNode (react-dom.development.js:24804:1)
    at Transition.performEnter (Transition.js:245:1)
    at Transition.updateStatus (Transition.js:228:1)
    at Transition.componentDidUpdate (Transition.js:192:1)
    at commitLayoutEffectOnFiber (react-dom.development.js:23338:1)
    at commitLayoutMountEffects_complete (react-dom.development.js:24688:1)
    at commitLayoutEffects_begin (react-dom.development.js:24674:1)
    at commitLayoutEffects (react-dom.development.js:24612:1)
    at commitRootImpl (react-dom.development.js:26823:1)
    at commitRoot (react-dom.development.js:26682:1)
    at performSyncWorkOnRoot (react-dom.development.js:26117:1)
    at flushSyncCallbacks (react-dom.development.js:12042:1)
    at react-dom.development.js:25651:1
The above error occurred in the <Transition> component:
    at Transition (http://localhost:3000/static/js/0.chunk.js:540456:30)
    at CSSTransition (http://localhost:3000/static/js/0.chunk.js:539573:35)
    at div
    at div
    at SlidingPanel (http://localhost:3000/static/js/0.chunk.js:514513:5)
    at Panel (http://localhost:3000/static/js/main.chunk.js:56325:5)
    at Navbar (http://localhost:3000/static/js/main.chunk.js:47574:5)
    at div
    at div
    at Board (http://localhost:3000/static/js/main.chunk.js:34059:72)
    at div
    at Layout (http://localhost:3000/static/js/main.chunk.js:56020:5)
    at Route (http://localhost:3000/static/js/0.chunk.js:514032:29)
    at UserRoute (http://localhost:3000/static/js/main.chunk.js:63095:16)
    at Switch (http://localhost:3000/static/js/0.chunk.js:514234:29)
    at App (http://localhost:3000/static/js/main.chunk.js:8008:83)
    at Router (http://localhost:3000/static/js/0.chunk.js:513663:30)
    at BrowserRouter (http://localhost:3000/static/js/0.chunk.js:513284:35)
    at Provider (http://localhost:3000/static/js/0.chunk.js:511261:5)

Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.
0

There are 0 best solutions below