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: Extract the fetchRSC function #10564

Merged
merged 3 commits into from
May 12, 2024

Conversation

Tobbe
Copy link
Member

@Tobbe Tobbe commented May 12, 2024

I gave up on splitting (see #10563)

But I did want to write down some of the findings from that experiment, and also saw an opportunity to at least to some refactoring.

The main findings were/are these:

    // React will hold on to `callServer` and use that when it detects a
    // server action is invoked (like `action={onSubmit}` in a <form>
    // element). So for now at least we need to send it with every RSC
    // request, so React knows what `callServer` method to use for server
    // actions inside the RSC.
      // I'm not sure this recursive use of `options` is needed. I briefly
      // tried without it, and things seemed to work. But keeping it for
      // now, until we learn more.
      const data = createFromFetch(response, options)

@Tobbe Tobbe added release:chore This PR is a chore (means nothing for users) changesets-ok Override the changesets check labels May 12, 2024
@Tobbe Tobbe added this to the RSC milestone May 12, 2024
@Tobbe Tobbe enabled auto-merge (squash) May 12, 2024 15:53
@Tobbe Tobbe merged commit f77331a into redwoodjs:main May 12, 2024
46 of 53 checks passed
dac09 added a commit that referenced this pull request May 15, 2024
…uth-store

* 'main' of github.com:redwoodjs/redwood:
  chore(router): Add more code comments to analyzeRoutes (#10569)
  RSC: No need to use memo or useMemo in the server router (#10568)
  RSC: getViteConfig in rscWorker (#10567)
  Split RSC and RSA handling in rscWorker (#10565)
  RSC: Extract the fetchRSC function (#10564)
  RSC: Fix TODO regarding SSR in client.ts (#10562)
  Docs: QoL Updates to Contributing.md (#10561)
  Added warning note to not add WebAuthn (#10231)
  fix(rsc): Load all css links to support css with rsc (#10544)
  fix(cli): Add deprecation notice for edgio deployment (#10551)
  Define `process.env.NODE_ENV` in build process. (#10553)
  chore(docs): Update dbAuth and Supabase middleware READMEs (#10552)
  chore(deps): Upgrade React 19 to beta 20240508 (#10560)
  Revert "chore(deps): React beta 20240508 (#10558)" (#10559)
  chore(deps): React beta 20240508 (#10558)
  fix(functions): Fix context variable warning/error (#10556)
  fix(functions): Mock context in function test template (#10555)
  chore(middleware): Format code and comments and fix comment grammar (#10554)
@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
changesets-ok Override the changesets check release:chore This PR is a chore (means nothing for users)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants