sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

React mismatch error with SPFX and SPO365

Open teresahoes opened this issue 3 years ago • 3 comments

Hello I have started having the same React issue with my list extension as was noted in this prior issue:

https://github.com/SharePoint/sp-dev-docs/issues/8482

I am getting the React mismatch issue reported when trying to launch a dialog:

"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: 1. You might have mismatching versions of React and the renderer (such as React DOM) 2. You might be breaking the Rules of Hooks 3. You might have more than one copy of React in the same app See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem."

As before the code had not changed, but this error just started happening on 5/11.

I did try updating my project to the latest spfx version, but that has not resolved the issue.

React Version in SPO365 is 17.0.1 Package.json:

"dependencies": { "@microsoft/decorators": "1.17.1", "@microsoft/sp-adaptive-card-extension-base": "1.17.1", "@microsoft/sp-core-library": "1.17.1", "@microsoft/sp-dialog": "1.17.1", "@microsoft/sp-extension-base": "1.17.1", "@microsoft/sp-listview-extensibility": "1.17.1", "@microsoft/sp-lodash-subset": "1.17.1", "@pnp/graph": "^3.12.1", "@pnp/sp": "^3.12.1", "office-ui-fabric-react": "7.199.1", "react": "17.0.1", "react-dom": "17.0.1", "tslib": "2.3.1" },

i do not have any references to the @microsoft/office-ui-fabric-react-bundle package - which resolved the issue last time. This code has not changed since the last time this happened.

thanks

teresahoes avatar May 15 '23 16:05 teresahoes

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

ghost avatar May 15 '23 16:05 ghost

Seems like a dupe of #8968

AJIXuMuK avatar May 16 '23 12:05 AJIXuMuK

Closing this issue as a dupe. Please refer to our wiki for more details: Issue List Labels: status:duplicate

ghost avatar May 16 '23 12:05 ghost