Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
keep registerClientReference and registerServerReference
  • Loading branch information
alunyov committed Dec 16, 2023
commit 5f125f9e132142fc84cc386bdf67e204b11ca377
2 changes: 2 additions & 0 deletions packages/react-server-dom-fb/src/ReactFlightDOMServerFB.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import {
import {setByteLengthOfChunkImplementation} from 'react-server/src/ReactServerStreamConfig';

export {
registerClientReference,
registerServerReference,
getRequestedClientReferencesKeys,
clearRequestedClientReferencesKeysSet,
setCheckIsClientReference,
Expand Down
12 changes: 12 additions & 0 deletions packages/react-server-dom-fb/src/ReactFlightReferencesFB.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ export function setCheckIsClientReference(
checkIsClientReference = impl;
}

export function registerClientReference<T>(
clientReference: ClientReference<T>,
): void {}

export function isClientReference(reference: mixed): boolean {
if (checkIsClientReference == null) {
throw new Error('Expected implementation for checkIsClientReference.');
Expand All @@ -58,6 +62,14 @@ export function resolveClientReferenceMetadata<T>(
return {moduleId: clientReference.getModuleId(), exportName: 'default'};
}

export function registerServerReference<T>(
serverReference: ServerReference<T>,
id: string,
exportName: null | string,
): ServerReference<T> {
throw new Error('registerServerReference: Not Implemented.');
}

export function isServerReference<T>(reference: T): boolean {
throw new Error('isServerReference: Not Implemented.');
}
Expand Down