MCPcopy
hub / github.com/facebook/react / clientReference

Function clientReference

packages/react-client/src/__tests__/ReactFlight-test.js:222–232  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

220 });
221
222 function clientReference(value) {
223 return Object.defineProperties(
224 function () {
225 throw new Error('Cannot call a client function from the server.');
226 },
227 {
228 $$typeof: {value: Symbol.for('react.client.reference')},
229 value: {value: value},
230 },
231 );
232 }
233
234 it('can render a Server Component', async () => {
235 function Bar({text}) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected