Skip to content

Commit

Permalink
Rename createRSCHook to createFlightHook (#35665)
Browse files Browse the repository at this point in the history
Updates the naming of these to be in line with what it does.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
  • Loading branch information
timneutkens committed Mar 28, 2022
1 parent ab119bc commit 65680ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/next/server/render.tsx
Expand Up @@ -307,7 +307,7 @@ function checkRedirectValues(

const rscCache = new Map()

function createRSCHook() {
function createFlightHook() {
return (
writable: WritableStream<Uint8Array>,
id: string,
Expand Down Expand Up @@ -356,7 +356,7 @@ function createRSCHook() {
}
}

const useRSCResponse = createRSCHook()
const useFlightResponse = createFlightHook()

// Create the wrapper component for a Flight stream.
function createServerComponentRenderer(
Expand Down Expand Up @@ -386,7 +386,7 @@ function createServerComponentRenderer(
serverComponentManifest
)

const response = useRSCResponse(
const response = useFlightResponse(
writable,
cachePrefix + ',' + id,
reqStream,
Expand Down

0 comments on commit 65680ba

Please sign in to comment.