-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remix 1.16.0-pre.0 React 17 cannot destructure property useLoaderData is undefined during Client Side routing #6203
Comments
I've tested this again with Remix versions
|
@kevinbailey25 I just gave this a try on 1.16.0-pre.1 / React 17, I don't see any issues. |
@machour thanks for looking at this. Sorry this didn't show the error or my instructions weren't as clear. Here's a repo with the reproduction. My main machine is running Windows 10 and I made this one on my mac and has the same issue. I've tried to include more details in the readme.md https://github.com/kevinbailey25/remix-16pre-react-17 Please let me know how else I can help. |
@machour I just upgraded this repo to 1.16.0-pre.6 and it seems like the error is no longer happening. Hopefully that means my issue got fixed with one of the other prereleases. I will do more testing tomorrow or Monday and fully confirm. In the meantime, thanks for all your help. I'll leave this repo at pre.1 in case you are curious to look. |
@machour tested several different projects on |
This is happening again to me, where I have remix 2.1.0 and react 18 :/ |
What version of Remix are you using?
1.16.0-pre.0
Are all your remix dependencies & dev-dependencies using the same version?
Steps to Reproduce
npx create-remix@1.16.0-pre.0
react
,react-dom
,@types/react
and@types/react-dom
to^17.0.2
.json({ test: 'data' })
const { test } = useLoaderData<typeof loader>()
Link
in your_index.tsx
to navigate to your route.npm run dev
_index
page and click your link to do a client side navigation to your new route that loads data.Expected Behavior
Route renders with the data with no console errors or weird rerendering
Actual Behavior
Page re-renders oddly and appears to work, but console log shows
The text was updated successfully, but these errors were encountered: