Skip to content
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

Chakra UI example update. #424

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Lon4ry
Copy link

@Lon4ry Lon4ry commented Feb 11, 2024

Closes #335

Update the example as described here and use the last create-remix template.

@Lon4ry Lon4ry marked this pull request as draft February 11, 2024 18:51
@Lon4ry Lon4ry marked this pull request as ready for review February 11, 2024 18:51
@ITSjwags
Copy link

ITSjwags commented Nov 27, 2024

I know it's been a little while, but when I try to attempt this after upgrading to Remix 2.15.0 and trying to adopt the v3_singleFetch future flag, I'm getting this error:

TypeError [ERR_INVALID_STATE]: Invalid state: ReadableStream is locked

Maybe something to do with using renderToString and then renderToPipeableStream? It's a little confusing to me right now. When I remove the steps around rendering to string -> extracting critical chunks and just start with the render to pipeable stream the error seems to go away. 🤔

EDIT: whoops, must have missed this in the docs
image

@mariojsnunes
Copy link

mariojsnunes commented Nov 28, 2024

@ITSjwags have you been able to solve it? I'm also stuck on how to convert this part:

  const html = renderToString(
    <ServerStyleContext.Provider value={null}>
      <CacheProvider value={cache}>
        <RemixServer context={remixContext} url={request.url} />
      </CacheProvider>
    </ServerStyleContext.Provider>,
  )

  const chunks = extractCriticalToChunks(html)

@ITSjwags
Copy link

ITSjwags commented Dec 2, 2024

@ITSjwags have you been able to solve it? I'm also stuck on how to convert this part:

  const html = renderToString(
    <ServerStyleContext.Provider value={null}>
      <CacheProvider value={cache}>
        <RemixServer context={remixContext} url={request.url} />
      </CacheProvider>
    </ServerStyleContext.Provider>,
  )

  const chunks = extractCriticalToChunks(html)

@mariojsnunes I haven't been able to solve it yet, other than removing that step. Which doesn't seem like the best approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chakra-ui example has hydration issues
3 participants