-
Notifications
You must be signed in to change notification settings - Fork 64
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
[feat]: work outside of 'use client' directive #909
Comments
Hey @tremby, thanks for opening this issue. You're right that the In the short term, I suggest you wrap P.S. |
OK. Thanks. I'm not sure why I didn't think of that. I already wrap You talk of cutting a release with Next 13 support. Would such a release be using |
Ah, I was a little fat fingered there. I meant 'use client'. Seems you're already wrapping them 👍🏻. Ideally yes, it'd be compatible on the server out of the box, IE no 'use client'. edit: rescoped the issue to make it clear this is feature work we'll need to do. |
OK, that's great, thanks. Incidentally, wrapping (I don't think |
@tremby checking in quickly here. We discussed creating a server-only component and decided to tackle the work in stages.
I had hoped we could release a server-only component in the short term, but because it requires so many breaking changes, we need to take some time to think about the best path forward. Thanks so much again for creating the issue. I'll close this for now to be replaced by #914. But if anything else comes up feel free to comment and I can, of course, re-open it. |
Yeah very reasonable decision! I only realized after our discussion above that nextjs's own |
Before you submit:
Describe the bug
The
<Imgix>
component cannot be used in a Next 13 app, using the new app router. The app crashes with an error.To Reproduce
npm run dev
Steps to reproduce the behaviour:
The error I see is like this:
Expected behaviour
Able to use the component.
Information:
I suspect this is happening during the server-side render, where I guess
createContext
does not exist.I'm not using
<ImgixProvider>
; I have no use for it. I tried removing the call tocreateContext
from the library, and that just reveals another error:I didn't go deeper than that.
The text was updated successfully, but these errors were encountered: