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

RSC: Make rw g page work for RSC projects #10903

Merged
merged 6 commits into from
Jul 2, 2024
Merged

Conversation

Tobbe
Copy link
Member

@Tobbe Tobbe commented Jul 2, 2024

When RSC is enabled pages are rendered on the server by default, and so can't use features that are available on the client side only. When importing from @redwoodjs/web things like React contexts will also be imported, which doesn't work when rendering on the server. So we need to be more specific about our imports.

Right now the imports are fairly ugly, but they work, which is most important. Hopefully we can clean them up in the future.

@Tobbe Tobbe added the release:feature This PR introduces a new feature label Jul 2, 2024
@Tobbe Tobbe added this to the RSC milestone Jul 2, 2024
@Tobbe Tobbe merged commit 02f65d9 into redwoodjs:main Jul 2, 2024
51 checks passed
@Tobbe Tobbe deleted the tobbe-rsc-g-page branch July 2, 2024 13:58
dac09 added a commit to dac09/redwood that referenced this pull request Jul 4, 2024
…rt-serverStore

* 'main' of github.com:redwoodjs/redwood:
  chore(comment): Remove comment that's wrong (redwoodjs#10912)
  chore(esm): Fix project-config dual packaging (redwoodjs#10901)
  RSC: dbAuth in kitchen-sink (redwoodjs#10907)
  RSC: No need to pass location to Router anymore (redwoodjs#10905)
  RSC: Make `rw g page` work for RSC projects (redwoodjs#10903)
  Updates document template to use exports field for htmlTags (redwoodjs#10902)
@Josh-Walker-GM Josh-Walker-GM modified the milestones: RSC, v8.0.0 Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:feature This PR introduces a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants