Skip to content

Doc: Update stale README docs #36549

@doehyunbaek

Description

@doehyunbaek

I found three documentation inconsistencies.

1. react-server README examples are missing newer createRequest / createPrerenderRequest arguments

The README examples call createRequest and createPrerenderRequest with arguments ending at filterStackFrame:

const request = createRequest(
model,
clientManifest,
options ? options.onError : undefined,
options ? options.identifierPrefix : undefined,
options ? options.temporaryReferences : undefined,
__DEV__ && options ? options.environmentName : undefined,
__DEV__ && options ? options.filterStackFrame : undefined,
);

const request = createPrerenderRequest(
model,
clientManifest,
onAllReady,
onFatalError,
options ? options.onError : undefined,
options ? options.identifierPrefix : undefined,
options ? options.temporaryReferences : undefined,
__DEV__ && options ? options.environmentName : undefined,
__DEV__ && options ? options.filterStackFrame : undefined,
);

But the actual signatures now also include debugStartTime and keepDebugAlive:

export function createRequest(
model: ReactClientValue,
bundlerConfig: ClientManifest,
onError: void | ((error: mixed) => ?string),
identifierPrefix: void | string,
temporaryReferences: void | TemporaryReferenceSet,
debugStartTime: void | number, // Profiling-only
environmentName: void | string | (() => string), // DEV-only
filterStackFrame: void | ((url: string, functionName: string) => boolean), // DEV-only
keepDebugAlive: boolean, // DEV-only

export function createPrerenderRequest(
model: ReactClientValue,
bundlerConfig: ClientManifest,
onAllReady: () => void,
onFatalError: () => void,
onError: void | ((error: mixed) => ?string),
identifierPrefix: void | string,
temporaryReferences: void | TemporaryReferenceSet,
debugStartTime: void | number, // Profiling-only
environmentName: void | string | (() => string), // DEV-only
filterStackFrame: void | ((url: string, functionName: string) => boolean), // DEV-only
keepDebugAlive: boolean, // DEV-only

Introduced by:

  • bbc13fa17be8eebef3e6ee47f48c76c0c44e2f36 — added keepDebugAlive
  • b1533b034ee5e38e825fe20d789f2e83ede163ad — added debugStartTime / options.startTime

2. eslint-plugin-react-compiler README still documents npm installation

The README still tells users to install eslint-plugin-react-compiler from npm:

Next, install `eslint-plugin-react-compiler`:
```sh
npm install eslint-plugin-react-compiler --save-dev
```

But the package is no longer listed as publishable:

const PUBLISHABLE_PACKAGES = [
'babel-plugin-react-compiler',
'react-compiler-healthcheck',
'react-compiler-runtime',
];

Introduced by:

  • f508edc83fa1eb316a974c274b4411f081d6e94d

3. eslint-plugin-react-compiler README references removed single rule name

The README still shows the old single-rule configuration:

```json
{
"rules": {
"react-compiler/react-compiler": "error"
}

Introduced by:

  • 7d29ecbeb24327fdcd889fe184311bbeb0f04c30

Candidate fixes

I have two small commits prepared:

Happy to open PR(s) for these if useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: UnconfirmedA potential issue that we haven't yet confirmed as a bug

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions