remix
remix copied to clipboard
After updating to 1.7.2 from 1.6.8: TypeError: (0 , import_react.useMatches) is not a function
What version of Remix are you using?
1.7.2
Steps to Reproduce
We updated our app to version 1.7.2 from 1.6.8 yesterday.
There seems to be an issue, both in development and in production.
When we refresh a page using the useMatches
hook, we are now getting the following error
TypeError: (0 , import_react.useMatches) is not a function
at AssessmentPageRoute (/app_path/app/routes/page/$pageName.tsx:27:25)
at renderWithHooks (/app_path/node_modules/react-dom/cjs/react-dom-server.node.development.js:5724:16)
at renderIndeterminateComponent (/app_path/node_modules/react-dom/cjs/react-dom-server.node.development.js:5797:15)
at renderElement (/app_path/node_modules/react-dom/cjs/react-dom-server.node.development.js:6012:7)
at renderNodeDestructiveImpl (/app_path/node_modules/react-dom/cjs/react-dom-server.node.development.js:6170:11)
at renderNodeDestructive (/app_path/node_modules/react-dom/cjs/react-dom-server.node.development.js:6142:14)
at renderContextProvider (/app_path/node_modules/react-dom/cjs/react-dom-server.node.development.js:5986:3)
at renderElement (/app_path/node_modules/react-dom/cjs/react-dom-server.node.development.js:6083:11)
navigating to the route works perfectly.
Expected Behavior
We expect the useMatches hook to be a function
Actual Behavior
The application crashes and there is nothing we can do here but to close the app
upstream issue with esbuild, looking into updating our dependency now :)
https://github.com/evanw/esbuild/issues/2534
Same error on my application after changing remix version to 1.7.2
@nkrmr do you mean 1.7.4? Bug was reported on 1.7.2 and the fix haven't been merged yet, see #4301
Closed by #4301