Skip to content

Improve typing of renderApplication#56636

Closed
rubennorte wants to merge 1 commit into
react:mainfrom
rubennorte:export-D102325691
Closed

Improve typing of renderApplication#56636
rubennorte wants to merge 1 commit into
react:mainfrom
rubennorte:export-D102325691

Conversation

@rubennorte

Copy link
Copy Markdown
Contributor

Summary:
General typing improvements to the renderApplication module:

  • Refactors renderApplication to take a single options object instead
    of positional arguments, and removes the unused fabric and _unused
    parameters. The fabric parameter was already always treated as
    true internally, and the _unused slot was a reserved positional
    placeholder for a removed scopedPerformanceLogger argument.
  • Migrates the file to flow strict-local.
  • Types RootComponent and WrapperComponent using component syntax
    instead of React.ComponentType.
  • Replaces rootTag: any with number | RootTag, normalizing via the
    existing createRootTag helper for <AppContainer> and Number()
    for Renderer.renderElement.
  • Simplifies ActivityType (drops the unnecessary spread) and tightens
    null/boolean checks (debugName != null, useOffscreen === true).

Exports a new RenderApplicationOptions<Props> type and updates all
internal callers accordingly.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D102325691

Summary:
General typing improvements to the `renderApplication` module:

- Refactors `renderApplication` to take a single options object instead
  of positional arguments, and removes the unused `fabric` and `_unused`
  parameters. The `fabric` parameter was already always treated as
  `true` internally, and the `_unused` slot was a reserved positional
  placeholder for a removed `scopedPerformanceLogger` argument.
- Migrates the file to `flow strict-local`.
- Types `RootComponent` and `WrapperComponent` using component syntax
  instead of `React.ComponentType`.
- Replaces `rootTag: any` with `number | RootTag`, normalizing via the
  existing `createRootTag` helper for `<AppContainer>` and `Number()`
  for `Renderer.renderElement`.
- Simplifies `ActivityType` (drops the unnecessary spread) and tightens
  null/boolean checks (`debugName != null`, `useOffscreen === true`).

Exports a new `RenderApplicationOptions<Props>` type and updates all
internal callers accordingly.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D102325691
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 28, 2026
@meta-codesync

meta-codesync Bot commented Apr 28, 2026

Copy link
Copy Markdown

@rubennorte has exported this pull request. If you are a Meta employee, you can view the originating Diff in D102325691.

@meta-codesync meta-codesync Bot closed this in 2a5c4b3 Apr 28, 2026
@facebook-github-tools facebook-github-tools Bot added the Merged This PR has been merged. label Apr 28, 2026
@meta-codesync

meta-codesync Bot commented Apr 28, 2026

Copy link
Copy Markdown

This pull request has been merged in 2a5c4b3.

@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @rubennorte in 2a5c4b3

When will my fix make it into a release? | How to file a pick request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants